How a matrix is usually structured
In a matrix organisation people have a functional manager (who hires them and owns their craft) and a project or product lead (who directs their day-to-day work). This template draws the functional line as solid connectors and the project line as dashed ones, which is the usual convention for a matrix org chart.
Solid line for the manager, dotted for the project
Keep the solid line for whoever runs performance reviews and pay. The dotted line shows where the person spends their time. Mixing those up is the most common matrix chart mistake.
Limit dotted lines to real ones
If everyone has three dotted lines the chart stops meaning anything. Draw only the secondary reporting that people would actually escalate through.
Agree who decides what
A matrix works when the two managers know who owns which decisions, for example the functional head owns hiring and standards and the project lead owns priorities and deadlines.