Cramer's Rule and A Formula for Inverse

Cramer's Rule
Suppose [math]Ax=b[/math] is a matrix equation, where [math]A[/math] is an n x n matrix, [math]x[/math] and [math]b[/math] are n x 1 column vectors. Assuming [math]A[/math] is invertible, we can compute each of the entries in [math]x[/math] by the following formula:[br][br][math]x_i=\frac{\det (A_i(b))}{\det(A)}[/math], [math]i=1,2,\ldots,n[/math][br][br]where [math]A_i(b)[/math] is the n x n matrix obtained from [math]A[/math] by replacing the i[sup]th[/sup] column by the column vector [math]b[/math]:[br][br][math]A_i(b)=\left[\mathbf{a}_1 \ \cdots \underbrace{\mathbf{b \ \ }}_{i^{\text{th}} \ \text{column}} \cdots \ \mathbf{a}_n\right][/math][br][br]This formula is called [b]Cramer's rule[/b]. It is useful mainly for solving linear systems with variable coefficients. [br][br][u]Example[/u]: Consider the following system in which [math]s[/math] is an unspecified parameter. Determine the values of [math]s[/math] which the system has a unique solution, and use Cramer's rule to describe the solution.[br][br][math]\left\{\begin{eqnarray}3sx_1-2x_2 & = & 4\\-6x_1+sx_2 & = & 1\end{eqnarray}\right.[/math][br][br]Let [math]A=\begin{pmatrix}3s & -2\\-6 & s\end{pmatrix}[/math]. The above system can be expressed as the matrix equation [math]Ax=b[/math], where [math]b=\begin{pmatrix}4 \\1\end{pmatrix}[/math] and [math]x=\begin{pmatrix}x_1 \\x_2\end{pmatrix}[/math]. Then [math]\det(A)=3s^2-12=3(s+2)(s-2)[/math], which means that the system has a unique solution exactly when [math]s\ne\pm 2[/math].[br][br]To apply Cramer's rule, we need to compute [math]\det (A_1(b))[/math] and [math]\det (A_2(b))[/math], where[br][br][math]A_1(b)=\begin{pmatrix}4&-2\\1&s\end{pmatrix}, \ \ A_2(b)=\begin{pmatrix}3s&4\\-6&1\end{pmatrix} [/math][br][br]Hence, we have[br][br][math]\begin{eqnarray}x_1 & = & \frac{\det (A_1(b))}{\det(A)}=\frac{4s+2}{3(s+2)(s-2)}\\[br]x_2 & = & \frac{\det (A_2(b))}{\det(A)}=\frac{s+8}{(s+2)(s-2)}\end{eqnarray}[/math][br][br][br][u]The proof of Cramer's rule[/u]:[br][br]Let [math]I=\left[\mathbf{e_1} \ \mathbf{e_2} \ \cdots \ \mathbf{e_n}\right][/math] be the n x n identity matrix, where [math]\left\{\mathbf{e_1}, \mathbf{e_2}, \ldots, \mathbf{e_n}\right\}[/math] is the standard basis. Suppose [math]Ax=b[/math]. We have[br][br][math]\begin{eqnarray}A\cdot I_i(x) &= & A\left[\mathbf{e_1} \ \cdots \ \mathbf{x} \ \cdots \ \mathbf{e_n}\right]=\left[A\mathbf{e_1} \ \cdots \ A\mathbf{x} \ \cdots \ A\mathbf{e_n}\right] \\ [br]& = & \left[\mathbf{a_1} \ \cdots \ \mathbf{b} \ \cdots \ \mathbf{a_n}\right]=A_i(b)\end{eqnarray}[/math][br][br]Taking determinants on both sides, we get[br][br][math](\det(A))(\det(I_i(x)))=\det(A_i(b))[/math][br][br]By a cofactor expansion along the ith row of [math]I_i(x)[/math], it is easy to see that [math]\det(I_i(x))=x_i[/math]. Hence, [math]x_i=\frac{\det (A_i(b))}{\det(A)}[/math] for [math]i=1,2,\ldots,n[/math].[br]
A Formula for Inverse
We can easily derive a formula for [math]A^{-1}[/math] from Cramer's rule. Let [math]x[/math] be the jth column of [math]A^{-1}[/math]. Then [math]Ax=\mathbf{e_j}[/math]. By Cramer's rule,[br][br][math](i,j)\text{-entry of} \ A^{-1}=x_i=\frac{\det(A_i(\mathbf{e_j}))}{\det(A)}[/math][br][br]Notice that [math]\det(A_i(\mathbf{e_j}))=(-1)^{i+j}\det(A_{ji})=C_{ji}[/math], where [math]C_{ji}[/math] is the [math](j,i)[/math]-cofactor of [math]A[/math]. Let [math]\text{adj}(A)[/math] be the [b]adjugate[/b] of [math]A[/math], the transpose of the matrix of cofactors:[br][br][math]\text{adj}(A)=\begin{pmatrix}C_{11} & C_{12} & \cdots & C_{1n}\\C_{21} & C_{22} & \cdots & C_{2n}\\ \vdots & \vdots & & \vdots\\C_{n1} & C_{n2} & \cdots & C_{nn}\end{pmatrix}^T=\begin{pmatrix}C_{11} & C_{21} & \cdots & C_{n1}\\C_{12} & C_{22} & \cdots & C_{n2}\\ \vdots & \vdots & & \vdots\\C_{1n} & C_{2n} & \cdots & C_{nn}\end{pmatrix}[/math][br][br]Then the following is the formula for [math]A^{-1}[/math]:[br][br][math]A^{-1}=\frac1{\det(A)} \text{adj}(A)[/math][br][br][br]There is a nice youtube video [url=https://www.youtube.com/watch?v=YvjkPF6C_LI]here[/url] about using the above formula on a 3 x 3 matrix. However, we seldom use this formula in practice because it is much less efficient than using row operations. It is useful mainly for theoretical calculations.[br]

Information: Cramer's Rule and A Formula for Inverse