I have the following line of code:
\begin{equation}
X= \begin{bmatrix}
($1 - a_{11}$) & -a_{12} & -a_{13} & -a_{1n} \\
-a_{21} & (1-$a_{22}$) & -a_{23} & -a_{2n} \\
-a_{31} & -a_{32} & (1-$a_{33}$) & -a_{34} \\
-a_{41} & -a_{42} & -a_{43} & (1-$a_{nn}$)
\end{bmatrix}
\end{equation}
($1 - a_{11}$)
Which compiles to:
Whereas (1-a11) compiles properly outside the matrix, it does not work inside.
Can anyone give me a hint what I am missing here?
$
inside matrix. It is already in math environment!