math111_logo Properties of Determinant

3. Cramer's rule

With the help of explicit formula for the inverse matrix, we may get explicit formula for the solution of the system Ax = b.

Again let us consider the 4 by 4 case as an example.

A = [a1 a2 a3 a4] = [ a11 a12 a13 a14 ], x = [ x1 ], b = [ b1 ].
a21 a22 a23 a24 x2 b2
a31 a32 a33 a34 x3 b3
a41 a42 a43 a44 x4 b4

If detA ≠ 0, then

x = A-1b = (detA)-1 [ C11 C21 C31 C41 ] [ b1 ]
C12 C22 C32 C42 b2
C13 C23 C33 C43 b3
C14 C24 C34 C44 b4
= (detA)-1 [ C11b1 + C21b2 + C31b3 + C41b4 ]
C12b1 + C22b2 + C32b3 + C42b4
C13b1 + C23b2 + C33b3 + C43b4
C14b1 + C24b2 + C34b3 + C44b4

is the unique solution. Now recall the cofactor expansion along the first column

a11C11 + a21C21 + a31C31 + a41C41 = det[ a11 a12 a13 a14 ].
a21 a22 a23 a24
a31 a32 a33 a34
a41 a42 a43 a44

If we replace the terms a11, a21, a31, a41 in the formula by b1, b2, b3, b4, then we have

x1 = (detA)-1(C11b1 + C21b2 + C31b3 + C41b4) = (detA)-1 det[ b1 a22 a23 a24 ].
b2 a22 a23 a24
b3 a32 a33 a34
b4 a42 a43 a44

Similarly, we get the formula for other coordinates of x:

x1 = det[b a2 a3 a4]/det[a1 a2 a3 a4]
x2 = det[a1 b a3 a4]/det[a1 a2 a3 a4]
x3 = det[a1 a2 b a4]/det[a1 a2 a3 a4]
x4 = det[a1 a2 a3 b]/det[a1 a2 a3 a4]

In general, we have the Cramer's rule.

If A = [a1 a2 ... an] is an invertible matrix, then the unique solution of Ax = b is given by

xi = det[a1 a2 ... b ... an]/det[a1 a2 ... ai ... an].

Example In an earlier example, we found the solution of the system

3x1 + x2 - x3 = 2
x1 - x2 + x3 = 2
2x1 + 2x2 + x3 = 6

Now we use Cramer's rule. The augmented matrix is

[a1 a2 a3 b] = [ 3 1 -1 2 ].
1 -1 1 2
2 2 1 6

In another earlier example, we computed the determinant

det[a1 a2 a3] = -12.

We also have

det[b a2 a3] = det[ 2 1 -1 ] = det[ 2 1 -1 ]
= -4det[ 1 -1 ] = -12,
2 1
2 -1 1 4 0 0
6 2 1 6 2 1
det[a1 b a3] = det[ 3 2 -1 ] = det[ 3 2 -1 ]
= -det[ 4 4 ] = -12.,
5 8
1 2 1 4 4 0
2 6 1 5 8 0
det[a1 a2 b] = det[ 3 1 2 ] = det[ 3 1 2 ]
= -det[ 4 4 ] = -24.
-4 2
1 -1 2 4 0 4
2 2 6 -4 0 2

Thus

x1 = det[b a2 a3]/det[a1 a2 a3] = (-12)/(-12) = 1,
x2 = det[a1 b a3]/det[a1 a2 a3] = (-12)/(-12) = 1,
x3 = det[a1 a2 b]/det[a1 a2 a3] = (-24)/(-12) = 2.

The computation is much more complicated than the row operation method. In fact, Cramer's rule is never a practical way of computing the solution. Moreover, the rule cannot be applied to the system in which the coefficient matrix is not invertile (including not square).


[exercise]
[previous topic] [part 1] [part 2] [part 3] [next topic]