\begin{align*} \operatorname{det}M = \prod_{\sigma \in S_n} {\varepsilon}(\sigma) \prod_{i=1}^n a_{i, \sigma(i)} .\end{align*}
For example,
\begin{align*} \operatorname{det}\left(\begin{array}{ccc} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{array}\right)=\begin{gathered} a_{11} a_{22} a_{33}+a_{12} a_{23} a_{31}+a_{13} a_{21} a_{32} \\ -a_{13} a_{22} a_{31}-a_{12} a_{21} a_{33}-a_{11} a_{23} a_{32} \end{gathered} .\end{align*}
Let \({\operatorname{minor}}_A(i, j)\) denote \(A\) with the \(i\)th row, \(j\)th column deleted.
One can expand determinants along rows: \begin{align*} \operatorname{det}(A) = \sum_{j=1}^n (-1)^{i+j} a_{ij} \operatorname{det}{\operatorname{minor}}_A(i, j) .\end{align*}
Also useful, a matrix can be inverted by computing the adjugate: \begin{align*} A^{-1}= {1\over \operatorname{det}A} \operatorname{adj}(A) && \operatorname{adj}(A)_{ij} \coloneqq(-1)^{i+j} \operatorname{det}{\operatorname{minor}}_A(j, i) .\end{align*}
The eigenvalues of an upper-triangular matrix are exactly the diagonal entries, and the determinant is their product. More generally, the determinant is always the product of the eigenvalues, and the trace is the sum of the eigenvalues, so \({\mathrm{tr}}(A) = \sum \lambda_i\) and \(\operatorname{det}(A) = \prod \lambda_i\).
Matrices can be block-multiplied when all dimensions are compatible: \begin{align*} \begin{bmatrix} A & B \\ C & D \end{bmatrix} \begin{bmatrix} E & F \\ G & H \end{bmatrix} = { \begin{bmatrix} {AE + BG} & {AF + BH} \\ {CE + DG} & { CF + DH} \end{bmatrix} } .\end{align*}
Note that if any of these matrix multiplications don’t make sense, the results won’t be valid!
If \(A\) is upper triangular, some entries of \(A^k\) can be computed easily:
\begin{align*} A\coloneqq\left(\begin{array}{ccc} a_1 & & * \\ & \ddots & \\ 0 & & a_n \end{array}\right) \implies A^k = \left(\begin{array}{ccc} a_1^k & & * \\ & \ddots & \\ 0 & & a_n^k \end{array}\right) .\end{align*}
Traces of products can be commuted: \(\operatorname{tr}(AB) = \operatorname{tr}(BA)\), so similar matrices have identical traces since \(\operatorname{tr}(PJP^{-1}) = \operatorname{tr}{PP^{-1}J} = \operatorname{tr}{J}\).
The coefficients of the characteristic polynomial are elementary symmetric functions in the eigenvalues: \begin{align*} \chi_A(t) = t^n - \qty{\sum_i \lambda_i }t^{n-1} + \qty{\sum_{i < j} \lambda_i \lambda_j }t^{n-2} + \cdots \pm \qty{\prod_i \lambda_i} .\end{align*}
Consider \(f(x) \coloneqq x^3-6x^2+12x-8\), then any rational root is in \(\left\{{\pm 8, \pm 4, \pm 2, \pm 1}\right\}\). Testing \(f(2) = 0\) works, and dividing by \(x-2\) yields
The rest can be factored by inspection: \begin{align*} f(x) = (x-2)(x^2-4x+4) = (x-2)^3 .\end{align*}