0% found this document useful (0 votes)
79 views

Cramer's Rule and Inverse Matrix Method

The document summarizes methods for solving systems of linear equations, including Cramer's rule and the inverse matrix method. Cramer's rule can be used to find unique solutions when the determinant of the coefficient matrix A is not equal to 0. The inverse matrix method involves premultiplying both sides of the system AX=b by the inverse of A to obtain the solution X=A^-1b. The document provides examples of applying both methods. It also discusses that if the determinant of A is equal to 0, the system may have infinite solutions or no solution.

Uploaded by

anas ejaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views

Cramer's Rule and Inverse Matrix Method

The document summarizes methods for solving systems of linear equations, including Cramer's rule and the inverse matrix method. Cramer's rule can be used to find unique solutions when the determinant of the coefficient matrix A is not equal to 0. The inverse matrix method involves premultiplying both sides of the system AX=b by the inverse of A to obtain the solution X=A^-1b. The document provides examples of applying both methods. It also discusses that if the determinant of A is equal to 0, the system may have infinite solutions or no solution.

Uploaded by

anas ejaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Lecture 3

Cramer’s rule and Inverse matrix method


Sections 5.5, 4.6 from
Fundamental methods of Mathematical Economics, McGraw Hill 2005, 4th Edition.
By A. C. Chiang & Kevin Wainwright are covered.

Non-homogenous systems of linear equations:

An arbitrary system of m linear equations in n unknowns of form

𝑎11 𝑥1 + 𝑎12 𝑥2 + ⋯ + 𝑎1𝑛 𝑥𝑛 = 𝑑1

𝑎21 𝑥1 + 𝑎22 𝑥2 + ⋯ + 𝑎2𝑛 𝑥𝑛 = 𝑑2

𝑎𝑚1 𝑥1 + 𝑎𝑚2 𝑥2 + ⋯ + 𝑎𝑚𝑛 𝑥𝑛 = 𝑑𝑚

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).

This system can be expressed as 𝐴𝑋 = 𝑏

where

𝑎11 𝑎12 … 𝑎1𝑛 𝑥1 𝑑1


𝑎21 𝑎22 … 𝑎2𝑛 𝑥2 𝑑2
𝐴=[ ⋮ ⋮ ⋮ ⋮ ],𝑋 = [ ⋮ ],𝑏 = [ ⋮ ]
𝑎𝑚1 𝑎𝑚2 … 𝑎𝑚𝑛 𝑥𝑛 𝑑𝑚

A is called matrix of coefficients.

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

|𝐴1 | |𝐴2 | |𝐴𝑛 |


𝑥1 = , 𝑥2 = , … , 𝑥𝑛 =
|𝐴| |𝐴| |𝐴|

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]

𝑑𝑛

Example 1: Use Cramer’s rule to solve

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

|𝐴| = −132, |𝐴1 | = −36, |𝐴2 | = −24, |𝐴3 | = 12

Therefore

|𝐴1 | −36 3
𝑥1 = = =
|𝐴| −132 11

|𝐴2 | −24 2
𝑥2 = = =
|𝐴| −132 11

|𝐴3 | 12 1
𝑥3 = = =−
|𝐴| −132 11

Example 2: Use Cramer’s rule to solve

𝑥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

|𝐴| = −55, |𝐴1 | = 144, |𝐴2 | = 61, |𝐴3 | = −230

Therefore

|𝐴1 | 144 |𝐴2 | 61 |𝐴3 | −230 46


𝑥1 = =− , 𝑥2 = = − , 𝑥3 = = =
|𝐴| 55 |𝐴| 55 |𝐴| −55 11

Example 3: Use Cramer’s rule to solve following homogeneous system

𝑥1 + 2𝑥3 = 0

−3𝑥1 + 4𝑥2 + 6𝑥3 = 0

−𝑥1 − 2𝑥2 + 3𝑥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

|𝐴| = 44, |𝐴1 | = 0, |𝐴2 | = 0, |𝐴3 | = 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.

Remark: Cramer’s rule is applicable if A is square matrix and |𝐴| ≠ 0.

Question: Given the system of equations below , solve for z ONLY.

2𝑥 + 𝑦 + 𝑧 = 1
𝑥 – 𝑦 + 4𝑧 = 0
𝑥 + 2𝑦 – 2𝑧 = 3

Inverse matrix method

The application of the concept of inverse matrix to the solution of a simultaneous equation
system is immediate and direct.

A non-homogeneous linear system can be expressed as

𝐴𝑋 = 𝑑

Now if 𝐴−1 exists, the premultiplication of both sides of above equation by 𝐴−1 yields

𝐴−1 𝐴𝑋 = 𝐴−1 𝑑 or 𝑋 = 𝐴−1 𝑑 yields solution of system.

Example 1: Use Inverse matrix method to solve

𝑥1 − 4𝑥2 + 𝑥3 = 6

4𝑥1 − 𝑥2 + 2𝑥3 = −1

2𝑥1 + 2𝑥2 − 3𝑥3 = −20

Solution:

4
1 −4 1 6 𝑥1
𝐴 = [4 −1 2 ] , 𝑑 = [ −1 ] , 𝑋 = [𝑥2 ]
2 2 −3 −20 𝑥3

1/55 2/11 7/55


−1 −16/55 1/11 −2/55]
𝐴 =[
−2/11 2/11 −3/11

𝑋 = 𝐴−1 𝑑

𝑥1 1/55 2/11 7/55 6 −144/55


[𝑥2 ] = [−16/55 1/11 −2/55] [ −1 ] = [ −61/55 ]
𝑥3 −2/11 2/11 −3/11 −20 46/11

Using equality of matrices, solution of system is

144 61 −230 46
𝑥1 = − , 𝑥2 = − , 𝑥3 = =
55 55 −55 11

Example 2: Use Inverse matrix method to solve

𝑥1 + 2𝑥3 = 6

−3𝑥1 + 4𝑥2 + 6𝑥3 = 30

−𝑥1 − 2𝑥2 + 3𝑥3 = 8

Solution:

1 0 2 6 𝑥1
𝑥
𝐴 = [−3 4 6] , 𝑑 = [30] , 𝑋 = [ 2 ]
−1 −2 3 8 𝑥3

6/11 −1/11 −2/11


−1
𝐴 = [3/44 5/44 −3/11]
5/22 1/22 1/11

𝑥1 6/11 −1/11 −2/11 6 −10/11


𝑥
[ 2 ] = [3/44 5/44 −3/11] [30] = [ 18/11 ]
𝑥3 5/22 1/22 1/11 8 38/11

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

−𝑥1 + 7𝑥2 − 2𝑥3 = 1

2𝑥1 + 6𝑥2 − 𝑥3 = 5

Solution:

3 −1 1 4
𝐴 = [−1 7 −2] , 𝑑 = [1]
2 6 −1 5

|𝐴| = 0

We cannot apply Cramer’s rule and inverse matrix method.

Example 4: Solve

𝑥1 − 3𝑥2 + 3𝑥3 = −1

𝑥1 − 3𝑥2 + 4𝑥3 = 5

−𝑥1 + 3𝑥2 + 5𝑥3 = 1

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.

Example 5: Given the following model

𝑌 = 𝐶 + 𝐼0 + 𝐺0 ,

𝐶 = 𝑎 + 𝑏(𝑌 − 𝑇) (𝑎 > 0, 0 < 𝑏 < 1) [T: taxes]

𝑇 = 𝑑 + 𝑡𝑌, (𝑑 > 0, 0 < 𝑡 < 1) [t: income tax rate]

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

Solution: System can be rewritten as

𝑌 − 𝐶 = 𝐼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

Expanding along first row yields

7
|𝐴| = 1 |1 𝑏
| − (−1) |
−𝑏 𝑏
| + 0 = 1 − 𝑏 + 𝑏𝑡
0 1 −𝑡 1

This national-income model will have unique solution only if |𝐴| = 1 − 𝑏 + 𝑏𝑡 ≠ 0.

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 − 𝑏 + 𝑏𝑡 ]

Using equality of matrices, we have

𝐼0 + 𝐺0 − 𝑏𝑑 + 𝑎
𝑌=
1 − 𝑏 + 𝑏𝑡

𝑎 − 𝑏𝑑 + 𝑏(1 − 𝑡)(𝐼0 + 𝐺0 )
𝐶=
1 − 𝑏 + 𝑏𝑡

𝑑(1 − 𝑏) + 𝑡(𝑎 + 𝐼0 + 𝐺0 )
𝑇=
1 − 𝑏 + 𝑏𝑡

You might also like