how to write matrix in overleaf code example Example: matrix latex $\left(\begin{array}{cc} a & b \\ c & d \end{array}\right)$