User:Djwinters/Cramer's rule

Cramer's Rule proof
Cramer’s rule can be proven using only two properties of determinants. The first property being that adding one column to another doesn’t change the value of the determinant, and the second property being that multiplying every element of one column by a factor will increase the value of the determinant by the same factor.

Given n linear equations with n variables (V1, V2,…,Vn).

(n=3 case is shown, but the proof is the same for any n.)

Populate an nxn matrix using the terms from the left side of the n linear equations; i.e. the variable times the coefficient (Frow,columnxVcolumn).

Then write the following equation;



1) Select one column of the determinant, which is in the numerator, and add all the other columns to that column.



2) This column now contains the left side of the n linear equations, so replace that column with the right side of the n linear equations.



3) Next factor out the variables (V1, V2,…,Vn), which are common factors to an entire column of the determinants, and collect the factors (V1, V2,…,Vn) on the left side of the equation



The result is an expression for the value of the variable, which was originally in the column which was modified in step 1 and 2. The procedure can be repeated for each column, thereby producing values for each variable, which simultaneously satisfy all n equations.



Better Cramer's Rule proof
Cramers rule can be proven using two properties of determinants only. The first property being that adding one column to another doesnt change the value of the determinant, and the second property being that multiplying every element of one column by a factor will increase the value of the determinant by the same factor.

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, for the value of $$x_1$$ the expression:
 * $$\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|}$$

which, using the aforementioned properties of determinants can be checked to be true. In fact, from the equations of the system this quotient is equal to
 * $$\frac{det\left|\begin{matrix}(a_{11}x_1+a_{12}x_2+\ldots+a_{1n}x_n)&a_{12}&\ldots&a_{1n}\\(a_{21}x_1+a_{22}x_2+\ldots+a_{2n}x_n)&a_{22}&\ldots&a_{2n}\\\vdots&\vdots&\ddots&\vdots\\(a_{n1}x_1+a_{n2}x_2+\ldots+a_{nn}x_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|}$$

By subtracting from the first column the second multiplied by $$x_2$$, the third column multiplied by $$x_3$$, and so on until the last column multiplied by $$x_n$$, it is found to be equal to
 * $$\frac{det\left|\begin{matrix}a_{11}x_1&a_{12}&\ldots&a_{1n}\\a_{21}x_1&a_{22}&\ldots&a_{2n}\\\vdots&\vdots&\ddots&\vdots\\a_{n1}x_1&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|}$$,

and according to the remaining property of determinants this is equal to
 * $$\frac{x_1det\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|}{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_1$$.

In the same way, if the columns of b's is replacing the k-th column of the matrix of the system of equations the result will be equal to $$x_k$$. As a result we get that:
 * $$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|}$$