Cramer's Rule and Inverse Matrix Method
Cramer's Rule and Inverse Matrix Method
Where x1,x2,...xn are unknowns and a’s and d’s denote constants, is known as non-
homogeneous system provided 𝑑’𝑠 𝑛𝑜𝑡 𝑎𝑙𝑙 𝑧𝑒𝑟𝑜 (at least one of them is non-zero).
where
Cramer’s rule: If AX=b is a system of n linear equations in n unknowns such that det(A)≠0,
then the system has a unique solution. This solution is
Where Aj is the matrix obtained by replacing the entries in the jth column of A by the entries
in the matrix
1
𝑑1
𝑑
𝑏 = [ 2]
⋮
𝑑𝑛
4𝑥1 + 5𝑥2 = 2
11𝑥1 + 𝑥2 + 2𝑥3 = 3
𝑥1 + 5𝑥2 + 2𝑥3 = 1
Solution:
4 5 0 2
𝐴 = [11 1 2] , 𝑑 = [3]
1 5 2 1
2 5 0 4 2 0 4 5 2
𝐴1 = [3 1 2] , 𝐴2 = [11 3 2] , 𝐴3 = [11 1 3]
1 5 2 1 1 2 1 5 1
Therefore
|𝐴1 | −36 3
𝑥1 = = =
|𝐴| −132 11
|𝐴2 | −24 2
𝑥2 = = =
|𝐴| −132 11
|𝐴3 | 12 1
𝑥3 = = =−
|𝐴| −132 11
𝑥1 − 4𝑥2 + 𝑥3 = 6
4𝑥1 − 𝑥2 + 2𝑥3 = −1
2
2𝑥1 + 2𝑥2 − 3𝑥3 = −20
Solution:
1 −4 1 6
𝐴 = [4 −1 2 ] , 𝑑 = [ −1 ]
2 2 −3 −20
6 −4 1 1 6 1 1 −4 6
𝐴1 = [ −1 −1 2 ] , 𝐴2 = [4 −1 2 ] , 𝐴3 = [4 −1 −1 ]
−20 2 −3 2 −20 −3 2 2 −20
Therefore
𝑥1 + 2𝑥3 = 0
Solution:
1 0 2 0
𝐴 = [−3 4 6] , 𝑑 = [0]
−1 −2 3 0
0 0 2 1 0 2 1 0 0
𝐴1 = [0 4 6] , 𝐴2 = [−3 0 6] , 𝐴3 = [−3 4 0]
0 −2 3 −1 0 3 −1 −2 0
Therefore
3
|𝐴1 | 0 |𝐴2 | 0 |𝐴3 | 0
𝑥1 = = = 0, 𝑥2 = = = 0, 𝑥3 = = =0
|𝐴| 44 |𝐴| 44 |𝐴| 44
Thus for a homogeneous system if |𝐴| ≠ 0, then only trivial solution exists and we can find
it by Cramer’s rule.
2𝑥 + 𝑦 + 𝑧 = 1
𝑥 – 𝑦 + 4𝑧 = 0
𝑥 + 2𝑦 – 2𝑧 = 3
The application of the concept of inverse matrix to the solution of a simultaneous equation
system is immediate and direct.
𝐴𝑋 = 𝑑
Now if 𝐴−1 exists, the premultiplication of both sides of above equation by 𝐴−1 yields
𝑥1 − 4𝑥2 + 𝑥3 = 6
4𝑥1 − 𝑥2 + 2𝑥3 = −1
Solution:
4
1 −4 1 6 𝑥1
𝐴 = [4 −1 2 ] , 𝑑 = [ −1 ] , 𝑋 = [𝑥2 ]
2 2 −3 −20 𝑥3
𝑋 = 𝐴−1 𝑑
144 61 −230 46
𝑥1 = − , 𝑥2 = − , 𝑥3 = =
55 55 −55 11
𝑥1 + 2𝑥3 = 6
Solution:
1 0 2 6 𝑥1
𝑥
𝐴 = [−3 4 6] , 𝑑 = [30] , 𝑋 = [ 2 ]
−1 −2 3 8 𝑥3
The solution is
5
10 18 38
𝑥1 = − 11 , 𝑥2 = 11 , 𝑥3 = 11.
Result: If in nonhomogeneous system AX=d, |𝐴| = 0, there are two possibilities for
solution
Either infinite many solutions exist for this system or system may be inconsistent (no solution
exists)
Example 3: Solve
3𝑥1 − 𝑥2 + 𝑥3 = 4
2𝑥1 + 6𝑥2 − 𝑥3 = 5
Solution:
3 −1 1 4
𝐴 = [−1 7 −2] , 𝑑 = [1]
2 6 −1 5
|𝐴| = 0
Example 4: Solve
𝑥1 − 3𝑥2 + 3𝑥3 = −1
𝑥1 − 3𝑥2 + 4𝑥3 = 5
Solution:
1 −3 3 −1
𝐴 = [ 1 −3 4] , 𝑑 = [ 5 ]
−1 3 5 1
6
|𝐴| = 0
We cannot apply Cramer’s rule and inverse matrix method. We can find solution by
Gaussian elimination or Gauss-Jordan Elimination.
𝑌 = 𝐶 + 𝐼0 + 𝐺0 ,
where Y , C and T are endogenous variables, and 𝐼0 and 𝐺0 represent the exogenous
variables.
(a) Rewrite national-income model in the AX=d (with Y as the first variable in vector
X).
(b) Find Y, C and T by inverse matrix method
𝑌 − 𝐶 = 𝐼0 + 𝐺0 ,
−𝑏𝑌 + 𝐶 + 𝑏𝑇 = 𝑎
−𝑡𝑌 + 𝑇 = 𝑑
1 −1 0 𝑌 𝐼0 + 𝐺0
[−𝑏 1 𝑏 ] [𝐶 ] = [ 𝑎 ]
−𝑡 0 1 𝑇 𝑑
where
1 −1 0 𝑌 𝐼0 + 𝐺0
𝐴 = [−𝑏 1 𝑏 ] , 𝑋 = [𝐶 ] , 𝐵 = [ 𝑎 ]
−𝑡 0 1 𝑇 𝑑
1 −1 0
|𝐴| = |−𝑏 1 𝑏|
−𝑡 0 1
7
|𝐴| = 1 |1 𝑏
| − (−1) |
−𝑏 𝑏
| + 0 = 1 − 𝑏 + 𝑏𝑡
0 1 −𝑡 1
1 1 −𝑏
𝑎𝑑𝑗( 𝐴) = [𝑏(1 − 𝑡) 1 −𝑏 ]
𝑡 𝑡 1−𝑏
1 1 1 −𝑏
−1
𝐴 = [𝑏(1 − 𝑡) 1 −𝑏 ]
1 − 𝑏 + 𝑏𝑡
𝑡 𝑡 1−𝑏
𝑌 1 1 1 −𝑏 𝐼0 + 𝐺0
[𝐶 ] = [𝑏(1 − 𝑡) 1 −𝑏 ] [ 𝑎 ]
1 − 𝑏 + 𝑏𝑡
𝑇 𝑡 𝑡 1−𝑏 𝑑
𝐼0 + 𝐺0 + 𝑎 − 𝑏𝑑
1 − 𝑏 + 𝑏𝑡
𝑌 𝑏(1 − 𝑡)(𝐼0 + 𝐺0 ) + 𝑎 − 𝑏𝑑
[𝐶 ] =
𝑇 1 − 𝑏 + 𝑏𝑡
𝑡(𝑎 + 𝐼0 + 𝐺0 ) + 𝑑(1 − 𝑏)
[ 1 − 𝑏 + 𝑏𝑡 ]
𝐼0 + 𝐺0 − 𝑏𝑑 + 𝑎
𝑌=
1 − 𝑏 + 𝑏𝑡
𝑎 − 𝑏𝑑 + 𝑏(1 − 𝑡)(𝐼0 + 𝐺0 )
𝐶=
1 − 𝑏 + 𝑏𝑡
𝑑(1 − 𝑏) + 𝑡(𝑎 + 𝐼0 + 𝐺0 )
𝑇=
1 − 𝑏 + 𝑏𝑡