Cramer's Rule

Recall the following:

Thus, $ A {\mathbf x}= {\mathbf b}$ has a unique solution FOR EVERY $ {\mathbf b}$ if and only if $ \det (A) \neq 0.$

The following theorem gives a direct method of finding the solution of the linear system $ A {\mathbf x}= {\mathbf b}$ when $ \det (A) \neq 0.$

THEOREM 2.6.18 (Cramer's Rule)   Let $ A {\mathbf x}= {\mathbf b}$ be a linear system with $ n$ equations in $ n$ unknowns. If $ \det(A) \neq 0,$ then the unique solution to this system is

$\displaystyle x_j = \frac{ \det(A_j)}{\det(A)}, \;\;
{\mbox{ for }} j=1, 2, \ldots, n,$

where $ A_j$ is the matrix obtained from $ A$ by replacing the $ j$ th column of $ A$ by the column vector $ {\mathbf b}.$

Proof. Since $ \det(A) \neq 0,\; $ $ A^{-1} = \displaystyle\frac{1}{\det(A)} Adj(A).$ Thus, the linear system $ A {\mathbf x}= {\mathbf b}$ has the solution $ {\mathbf x}= \displaystyle\frac{1}{\det(A)} Adj(A) {\mathbf b}.$ Hence, $ x_j,$ the $ j$ th coordinate of $ {\mathbf x}$ is given by

$\displaystyle x_j=\frac{b_1
C_{1j} + b_2 C_{2j} + \cdots + b_n C_{nj}}{\det(A)} =
\frac{\det (A_j)}{\det(A)}.$

height6pt width 6pt depth 0pt

The theorem implies that

$\displaystyle x_1 = \frac{1}{\det (A)} \;
\begin{vmatrix}b_1 & a_{12} & \cdots ...
...ts & \vdots & \ddots &
\vdots \\ b_n & a_{n2} & \cdots & a_{nn} \end{vmatrix}, $

and in general

$\displaystyle x_j = \frac{1}{\det (A)} \;
\begin{vmatrix}a_{11} & \cdots & a_{1...
...
a_{1n} & \cdots & a_{n j-1} & b_n & a_{n j+1} & \cdots & a_{nn}
\end{vmatrix} $

for $ j=2, 3, \ldots, n.$

EXAMPLE 2.6.19   Suppose that $ A = \begin{bmatrix}1 & 2 & 3 \\ 2 & 3 & 1 \\ 1
& 2 & 2 \end{bmatrix}$ and $ {\mathbf b}= \begin{bmatrix}1\\ 1
\\ 1\end{bmatrix}.$ Use Cramer's rule to find a vector $ {\mathbf x}$ such that $ A {\mathbf x}= {\mathbf b}.$
Solution: Check that $ \det(A) = 1.$ Therefore $ x_1 =
\begin{vmatrix}1 &2 & 3 \\ 1 & 3 & 1 \\
1 & 2 & 2\end{vmatrix}= -1,$
$ x_2 =
\begin{vmatrix}1 & 1 & 3 \\ 2 & 1 & 1 \\ 1 & 1 &
2\end{vmatrix}= 1,$ and $ x_3 = \begin{vmatrix}1 &2 &
1 \\ 2 & 3 & 1 \\ 1 & 2 & 1
\end{vmatrix}=0.$ That is, $ {\mathbf x}^t = (-1,1,0).$

A K Lal 2007-09-12