Expansion Theorem for Determinants

Theorem
Let $\mathbf A = \left[{a}\right]_n$ be a square matrix of order $n$.

Let $D = \det \left({\mathbf A}\right)$ be the determinant of $\mathbf A$.

Let $a_{pq}$ be an element of $\mathbf A$.

Let $A_{pq}$ be the cofactor of $a_{pq}$ in $D$.

Then:


 * $(1): \quad \displaystyle \forall r \in \left[{1 \,.\,.\, n}\right]: D = \sum_{k \mathop = 1}^n a_{rk} A_{rk}$
 * $(2): \quad \displaystyle \forall r \in \left[{1 \,.\,.\, n}\right]: D = \sum_{k \mathop = 1}^n a_{kr} A_{kr}$

Thus the value of a determinant can be found either by:
 * Multiplying all the elements in a row by their cofactors and adding up the products

or:
 * Multiplying all the elements in a column by their cofactors and adding up the products.

The identity:
 * $\displaystyle D = \sum_{k \mathop = 1}^n a_{rk} A_{rk}$

is known as the expansion of $D$ in terms of row $r$, while:
 * $\displaystyle D = \sum_{k \mathop = 1}^n a_{kr} A_{kr}$

is known as the expansion of $D$ in terms of column $r$.

Proof
Because of Determinant of Transpose, it is necessary to prove only one of these identities.

Let:
 * $D = \begin{vmatrix}

a_{11} & \cdots & a_{1k} & \cdots & a_{1n} \\ \vdots & \ddots & \vdots & \ddots & \vdots \\ a_{r1} & \cdots & a_{rk} & \cdots & a_{rn} \\ \vdots & \ddots & \vdots & \ddots & \vdots \\ a_{n1} & \cdots & a_{nk} & \cdots & a_{nn} \end{vmatrix}$

First, note that from Determinant with Row Multiplied by Constant, we have:


 * $\begin{vmatrix}

a_{11} & a_{12} & \cdots & a_{1n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{r1} & 0 & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ a_{n1} & a_{n2} & \cdots & a_{nn} \end{vmatrix} = a_{r1} \begin{vmatrix} a_{11} & a_{12} & \cdots & a_{1n} \\ \vdots & \vdots & \ddots & \vdots \\ 1 & 0 & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ a_{n1} & a_{n2} & \cdots & a_{nn} \end{vmatrix}$

... and similarly:


 * $\begin{vmatrix}

a_{11} & a_{12} & \cdots & a_{1n} \\ \vdots & \vdots & \ddots & \vdots \\ 0 & a_{r2} & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ a_{n1} & a_{n2} & \cdots & a_{nn} \end{vmatrix} = a_{r2} \begin{vmatrix} a_{11} & a_{12} & \cdots & a_{1n} \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 1 & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ a_{n1} & a_{n2} & \cdots & a_{nn} \end{vmatrix}$

and so on for the whole of row $r$.

From Determinant as Sum of Determinants:


 * $\displaystyle \begin{vmatrix}

a_{11} & \cdots & a_{1k} & \cdots & a_{1n} \\ \vdots & \ddots & \vdots & \ddots & \vdots \\ a_{r1} & \cdots & a_{rk} & \cdots & a_{rn} \\ \vdots & \ddots & \vdots & \ddots & \vdots \\ a_{n1} & \cdots & a_{nk} & \cdots & a_{nn} \end{vmatrix} = \sum_{k \mathop = 1}^n \left({a_{rk} \begin{vmatrix} a_{11} & \cdots & a_{1k} & \cdots & a_{1n} \\ \vdots & \ddots & \vdots & \ddots & \vdots \\  0 & \cdots & 1 & \cdots & 0 \\ \vdots & \ddots & \vdots & \ddots & \vdots \\  a_{n1} & \cdots & a_{nk} & \cdots & a_{nn} \end{vmatrix}}\right)$

Consider the determinant:
 * $\begin{vmatrix}

a_{11} & \cdots & a_{1\left({k-1}\right)} & a_{1k} & a_{1\left({k+1}\right)} & \cdots & a_{1n} \\ \vdots & \ddots & \vdots & \ddots & \vdots \\ a_{\left({r-1}\right)1} & \cdots & a_{\left({r-1}\right)\left({k-1}\right)} & a_{\left({r-1}\right)k} & a_{\left({r-1}\right)\left({k+1}\right)} & \cdots & a_{\left({r-1}\right)n} \\ 0 & \cdots & 0 & 1 & 0 & \cdots & 0 \\ a_{\left({r+1}\right)1} & \cdots & a_{\left({r+1}\right)\left({k-1}\right)} & a_{\left({r+1}\right)k} & a_{\left({r+1}\right)\left({k+1}\right)} & \cdots & a_{\left({r+1}\right)n} \\ \vdots & \ddots & \vdots & \ddots & \vdots \\ a_{n1} & \cdots & a_{n\left({k-1}\right)} & a_{nk} & a_{n\left({k+1}\right)} & \cdots & a_{nn} \end{vmatrix}$

Exchange rows $r$ and $r-1$, then (the new) row $r-1$ with row $r-2$, until finally row $r$ is at the top.

Row 1 will be in row 2, row 2 in row 3, and so on.

This is permuting the rows by a $k$-cycle of length $r$.

Call that $k$-cycle $\rho$.

Then from Parity of K-Cycle:
 * $\operatorname{sgn} \left({\rho}\right) = \left({-1}\right)^{r-1}$

Thus:
 * $\begin{vmatrix}

0 & \cdots & 1 & \cdots & 0 \\ a_{11} & \cdots & a_{1k} & \cdots & a_{1n} \\ \vdots & \ddots & \vdots & \ddots & \vdots \\ a_{\left({r-1}\right)1} & \cdots & a_{\left({r-1}\right)k} & \cdots & a_{\left({r-1}\right)n} \\ a_{\left({r+1}\right)1} & \cdots & a_{\left({r+1}\right)k} & \cdots & a_{\left({r+1}\right)n} \\ \vdots & \ddots & \vdots & \ddots & \vdots \\ a_{n1} & \cdots & a_{nk} & \cdots & a_{nn} \end{vmatrix} = \left({-1}\right)^{r-1} \begin{vmatrix} a_{11} & \cdots & a_{1k} & \cdots & a_{1n} \\ \vdots & \ddots & \vdots & \ddots & \vdots \\ a_{\left({r-1}\right)1} & \cdots & a_{\left({r-1}\right)k} & \cdots & a_{\left({r-1}\right)n} \\ 0 & \cdots & 1 & \cdots & 0 \\ a_{\left({r+1}\right)1} & \cdots & a_{\left({r+1}\right)k} & \cdots & a_{\left({r+1}\right)n} \\ \vdots & \ddots & \vdots & \ddots & \vdots \\ a_{n1} & \cdots & a_{nk} & \cdots & a_{nn} \end{vmatrix}$

The same argument can be applied to columns.

Thus:
 * $\begin{vmatrix}

1 & 0 & \cdots & 0 & 0 & \cdots & 0 \\ a_{1k} & a_{11} & \cdots & a_{1\left({k-1}\right)} & a_{1\left({k+1}\right)} & \cdots & a_{1n} \\ \vdots & \vdots & \ddots & \vdots & \vdots & \ddots & \vdots \\ a_{\left({r-1}\right)k} & a_{\left({r-1}\right)1} & \cdots & a_{\left({r-1}\right)\left({k-1}\right)} & a_{\left({r-1}\right)\left({k+1}\right)} & \cdots & a_{\left({r-1}\right)n} \\ a_{\left({r+1}\right)k} & a_{\left({r+1}\right)1} & \cdots & a_{\left({r+1}\right)\left({k-1}\right)} & a_{\left({r+1}\right)\left({k+1}\right)} & \cdots & a_{\left({r+1}\right)n} \\ \vdots & \vdots & \ddots & \vdots & \vdots & \ddots & \vdots \\ a_{nk} & a_{n1} & \cdots & a_{n\left({k-1}\right)} & a_{n\left({k+1}\right)} & \cdots & a_{nn} \end{vmatrix} = \left({-1}\right)^{k-1}\begin{vmatrix} 0 & \cdots & 1 & \cdots & 0 \\ a_{11} & \cdots & a_{1k} & \cdots & a_{1n} \\ \vdots & \ddots & \vdots & \ddots & \vdots \\ a_{\left({r-1}\right)1} & \cdots & a_{\left({r-1}\right)k} & \cdots & a_{\left({r-1}\right)n} \\ a_{\left({r+1}\right)1} & \cdots & a_{\left({r+1}\right)k} & \cdots & a_{\left({r+1}\right)n} \\ \vdots & \ddots & \vdots & \ddots & \vdots \\ a_{n1} & \cdots & a_{nk} & \cdots & a_{nn} \end{vmatrix}$

and so:
 * $\begin{vmatrix}

1 & 0 & \cdots & 0 & 0 & \cdots & 0 \\ a_{1k} & a_{11} & \cdots & a_{1\left({k-1}\right)} & a_{1\left({k+1}\right)} & \cdots & a_{1n} \\ \vdots & \vdots & \ddots & \vdots & \vdots & \ddots & \vdots \\ a_{\left({r-1}\right)k} & a_{\left({r-1}\right)1} & \cdots & a_{\left({r-1}\right)\left({k-1}\right)} & a_{\left({r-1}\right)\left({k+1}\right)} & \cdots & a_{\left({r-1}\right)n} \\ a_{\left({r+1}\right)k} & a_{\left({r+1}\right)1} & \cdots & a_{\left({r+1}\right)\left({k-1}\right)} & a_{\left({r+1}\right)\left({k+1}\right)} & \cdots & a_{\left({r+1}\right)n} \\ \vdots & \vdots & \ddots & \vdots & \vdots & \ddots & \vdots \\ a_{nk} & a_{n1} & \cdots & a_{n\left({k-1}\right)} & a_{n\left({k+1}\right)} & \cdots & a_{nn} \end{vmatrix} = \left({-1}\right)^{r+k} \begin{vmatrix} a_{11} & \cdots & a_{1k} & \cdots & a_{1n} \\ \vdots & \ddots & \vdots & \ddots & \vdots \\ a_{\left({r-1}\right)1} & \cdots & a_{\left({r-1}\right)k} & \cdots & a_{\left({r-1}\right)n} \\ 0 & \cdots & 1 & \cdots & 0 \\ a_{\left({r+1}\right)1} & \cdots & a_{\left({r+1}\right)k} & \cdots & a_{\left({r+1}\right)n} \\ \vdots & \ddots & \vdots & \ddots & \vdots \\ a_{n1} & \cdots & a_{nk} & \cdots & a_{nn} \end{vmatrix}$

Then:
 * $\left({-1}\right)^{r+k} \begin{vmatrix}

a_{11} & \cdots & a_{1\left({k-1}\right)} & a_{1\left({k+1}\right)} & \cdots & a_{1n} \\ \vdots & \ddots & \vdots & \vdots & \ddots & \vdots \\ a_{\left({r-1}\right)1} & \cdots & a_{\left({r-1}\right)\left({k-1}\right)} & a_{\left({r-1}\right)\left({k+1}\right)} & \cdots & a_{\left({r-1}\right)n} \\ a_{\left({r+1}\right)1} & \cdots & a_{\left({r+1}\right)\left({k-1}\right)} & a_{\left({r+1}\right)\left({k+1}\right)} & \cdots & a_{\left({r+1}\right)n} \\ \vdots & \ddots & \vdots & \vdots & \ddots & \vdots \\ a_{n1} & \cdots & a_{n\left({k-1}\right)} & a_{n\left({k+1}\right)} & \cdots & a_{nn} \end{vmatrix}$ is $A_{rk}$, the cofactor of $a_{rk}$ in $D$.

But from Determinant with Unit Element in Otherwise Zero Row, we have:


 * $\begin{vmatrix}

1 & 0 & \cdots & 0 \\ b_{21} & b_{22} & \cdots & b_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ b_{n1} & b_{n2} & \cdots & b_{nn} \end{vmatrix} = \begin{vmatrix} b_{22} & \cdots & b_{2n} \\ \vdots & \ddots & \vdots \\ b_{n2} & \cdots & b_{nn} \end{vmatrix}$

Assembling all the pieces derived above, the result follows.