User:Djwinters/Cramer's rule 3

Given n linear equations with n variables $$x_1$$, $$x_2$$,$$\ldots$$, $$x_n$$.
 * $$\begin{matrix}a_{11}x_1+a_{12}x_2+\ldots+a_{1n}x_n&=&b_1\\a_{21}x_1+a_{22}x_2+\ldots+a_{2n}x_n&=&b_2\\\vdots&\vdots&\vdots\\a_{n1}x_1+a_{n2}x_2+\ldots+a_{nn}x_n&=&b_n\end{matrix}$$

Cramer's rule gives the solution:
 * $$x_1=\frac{det\left|\begin{matrix}b_1&a_{12}&\ldots&a_{1n}\\b_2&a_{22}&\ldots&a_{2n}\\\vdots&\vdots&\ddots&\vdots\\b_n&a_{n2}&\ldots&a_{nn}\end{matrix}\right|}{det\left|\begin{matrix}a_{11}&a_{12}&\ldots&a_{1n}\\a_{21}&a_{22}&\ldots&a_{2n}\\\vdots&\vdots&\ddots&\vdots\\a_{n1}&a_{n2}&\ldots&a_{nn}\end{matrix}\right|}\ \ x_2=\frac{det\left|\begin{matrix}a_{11}&b_1&\ldots&a_{1n}\\a_{21}&b_2&\ldots&a_{2n}\\\vdots&\vdots&\ddots&\vdots\\a_{n1}&b_n&\ldots&a_{nn}\end{matrix}\right|}{det\left|\begin{matrix}a_{11}&a_{12}&\ldots&a_{1n}\\a_{21}&a_{22}&\ldots&a_{2n}\\\vdots&\vdots&\ddots&\vdots\\a_{n1}&a_{n2}&\ldots&a_{nn}\end{matrix}\right|}\ \ \ldots \ \ x_n=\frac{det\left|\begin{matrix}a_{11}&a_{12}&\ldots&b_{n}\\a_{21}&a_{22}&\ldots&b_{n}\\\vdots&\vdots&\ddots&\vdots\\a_{n1}&a_{n2}&\ldots&b_{n}\end{matrix}\right|}{det\left|\begin{matrix}a_{11}&a_{12}&\ldots&a_{1n}\\a_{21}&a_{22}&\ldots&a_{2n}\\\vdots&\vdots&\ddots&\vdots\\a_{n1}&a_{n2}&\ldots&a_{nn}\end{matrix}\right|}$$

These expressions for $$x_m$$ can be put into matrix notation as follows. First do a Laplace expansion (aka cofactor expansion) on the determinants which are in the numerators using the columns which contain $$b_1$$, $$b_2$$,$$\ldots$$, $$b_n$$. Thus Cramer's rule becomes;

$$x_m=\frac{\begin{matrix}c_{1m}b_1+c_{2m}b_2+\ldots+c_{nm}b_n\end{matrix}}{det\left|\begin{matrix}a_{11}&a_{12}&\ldots&a_{1n}\\a_{21}&a_{22}&\ldots&a_{2n}\\\vdots&\vdots&\ddots&\vdots\\a_{n1}&a_{n2}&\ldots&a_{nn}\end{matrix}\right|}$$

Where $$c_{rc}$$ are the cofactors of the coefficient matrix [A].

$$Where \ \ \ \ [A]=\begin{bmatrix}a_{11}&a_{12}&\ldots&a_{1n}\\a_{21}&a_{22}&\ldots&a_{2n}\\\vdots&\vdots&\ddots&\vdots\\a_{n1}&a_{n2}&\ldots&a_{nn}\end{bmatrix} \ \ \ [C]=\begin{bmatrix}c_{11}&c_{12}&\ldots&c_{1n}\\c_{21}&c_{22}&\ldots&c_{2n}\\\vdots&\vdots&\ddots&\vdots\\c_{n1}&c_{n2}&\ldots&c_{nn}\end{bmatrix}\ $$

$$and\ c_{rc}\ =-1^{r+c}M_{rc},\ where\ M_{rc}$$ is the determinant of the matrix formed by deleting row r and column c from [A]. Therefore Cramer's rule solutions for $$x_m$$ has the matrix form

$$\begin{bmatrix}x_{1}\\x_{2}\\\vdots\\x_{n}\end{bmatrix}\ =\frac{\begin{bmatrix}c_{11}&c_{12}&\ldots&c_{1n}\\c_{21}&c_{22}&\ldots&c_{2n}\\\vdots&\vdots&\ddots&\vdots\\c_{n1}&c_{n2}&\ldots&c_{nn}\end{bmatrix}^T\begin{bmatrix}b_{1}\\b_{2}\\\vdots\\b_{n}\end{bmatrix}}{det\left|\begin{matrix}a_{11}&a_{12}&\ldots&{a_1n}\\a_{21}&a_{22}&\ldots&a_{2n}\\\vdots&\vdots&\ddots&\vdots\\a_{n1}&a_{n2}&\ldots&a_{nn}\end{matrix}\right|}\ $$

$$[C]^T$$ is called the adjugate matrix of $$[A]$$, written as adj[A].

Both $$[C]^T[A]\ and \ [A][C]^T $$ are equal to det[A] times the idehtity matrix as shown below.


 * $$Let\ \

\begin{bmatrix}a_{11}&a_{12}&\ldots&a_{1n}\\a_{21}&a_{22}&\ldots&a_{2n}\\\vdots&\vdots&\ddots&\vdots\\a_{n1}&a_{n2}&\ldots&a_{nn}\end{bmatrix}

\begin{bmatrix}c_{11}&c_{12}&\ldots&c_{1n}\\c_{21}&c_{22}&\ldots&c_{2n}\\\vdots&\vdots&\ddots&\vdots\\c_{n1}&c_{n2}&\ldots&c_{nn}\end{bmatrix}^T

= \begin{bmatrix}d_{11}&d_{12}&\ldots&d_{1n}\\d_{21}&d_{22}&\ldots&d_{2n}\\\vdots&\vdots&\ddots&\vdots\\d_{n1}&d_{n2}&\ldots&d_{nn}\end{bmatrix}

$$

Consider $$ d_{ij} \ =\ \begin{matrix} a_{i1}c_{j1} +a_{i2}c_{j2}+\ldots+a_{in}c_{jn}\end{matrix}$$. When i=j this is just det[A] expressed as the cofactor expansion along row=i. When i not= j this is just the cofactor expansion of the determinant of [A] after row j has been replaced with row i, which is zero since 2 rows are identical.

Similarly


 * $$Let\ \

\begin{bmatrix}c_{11}&c_{12}&\ldots&c_{1n}\\c_{21}&c_{22}&\ldots&c_{2n}\\\vdots&\vdots&\ddots&\vdots\\c_{n1}&c_{n2}&\ldots&c_{nn}\end{bmatrix}^T

\begin{bmatrix}a_{11}&a_{12}&\ldots&a_{1n}\\a_{21}&a_{22}&\ldots&a_{2n}\\\vdots&\vdots&\ddots&\vdots\\a_{n1}&a_{n2}&\ldots&a_{nn}\end{bmatrix}

= \begin{bmatrix}d_{11}&d_{12}&\ldots&d_{1n}\\d_{21}&d_{22}&\ldots&d_{2n}\\\vdots&\vdots&\ddots&\vdots\\d_{n1}&d_{n2}&\ldots&d_{nn}\end{bmatrix}

$$

Consider $$ d_{ij} \ =\ \begin{matrix} c_{1i}a_{1j} +c_{2i}a_{2j}+\ldots+c_{ni}a_{nj}\end{matrix}$$. When i=j this is just det[A] expressed as the cofactor expansion along column=j. When i not= j this is just the cofactor expansion of the determinant of [A] after column i has been replaced with column j, which is zero since 2 columns are identical.

$$$$