0% found this document useful (0 votes)
10 views6 pages

Inverse Matrix Calculation in Sheets

Uploaded by

adam
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)
10 views6 pages

Inverse Matrix Calculation in Sheets

Uploaded by

adam
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

5.4.

FINDING THE INVERSE MATRIX 59


 
4 1 −1
 
Example 5.4.3 Find the inverse of B = 
0 3 2
.
 
3 0 7

Since |B| = 99 ̸= 0, B −1 exists. The cofactor matrix is


 
 3 2 0 2 0 3
 (−1)1+1 (−1)1+2 (−1)1+3 

 0 7 3 7 3 0

 
 
 1 −1 4 −1 4 1
 
C = (−1)2+1 (−1)2+2 (−1)2+3 

 0 7 3 7 3 0

 
 
 1 −1 4 −1 4 1
 
(−1)3+1 (−1)3+2 (−1)3+3 
3 2 0 2 0 3
 
 3 2 0 2 0 3 
 − 

 0 7 3 7 3 0 

 
 
 1 −1 4 −1 4 1
 
= − − 

 0 7 3 7 3 0

 
 
 1 −1 4 −1 4 1 
 
 − 
3 2 0 2 0 3
 
 21 6 −9
 
= 
−7 31 3
.
 
5 −8 12

Then  
 21 −7 5
 
adj B = C ′ = 
 6 31 −8
.
 
−9 3 12
60CHAPTER 5. LINEAR MODELS AND MATRIX ALGEBRA (CONTINUED)

Therefore, we have
 
 21 −7 5 
−1 1 
 6

B =  31 −8
.
99  
−9 3 12

 
2 4 5
 
Example 5.4.4 A =  
0 3 0.
 
1 0 1
We have |A| = −9 and
 
 3 −4 −15
1 
A−1 =− 
 0 −3 0 
.
9 
−3 4 6

5.5 Cramer’s Rule

The method of matrix inversion just discussed enables us to derive a con-


venient way of solving a linear-equation system, known as the Cramer’s
rule.

Derivation of the Cramer’s Rule

Given a linear-equation system Ax = d, the solution can be written as

1
x̄ = A−1 d = (adj A)d
|A|
5.5. CRAMER’S RULE 61

provided A is nonsingular. Thus,


  
|C | |C21 | · · · |Cn1 |   d1 
 11
  
1   
 |C12 | |C22 | · · · |Cn2 |   d2 
x̄ =   
|A| 
 ··· ··· ··· ···   
 · · ·
  
|C1n | |C2n | · · · |Cnn | dn
∑ 

n
i=1 di |Ci1 | 
 ∑n 
1  i=1 di |Ci2 | 

=  .
|A| 
 ··· 

 
∑n
i=1 di |Cin |

That is, the x̄j is given by

1 ∑ n
x̄j = di |Cij |
|A| i=1
 
a
 11
a12 · · · d1 · · · a1n 
 
1  a21 a22 · · · d2 · · · a2n 

=  
|A| 
· · · · · · · · · · · ·


 
an1 an2 · · · dn · · · ann
1
= |Aj |,
|A|

where |Aj | is obtained by replacing the jth column of |A| with constant
terms d1 , · · · , dn . This result is the statement of Cramer’s rule.

Example 5.5.1 Let us solve


    
2 3  x1  12
   =  
4 −1 x2 10

for x1 , x2 using Cramer’s rule. Since

|A| = −14, |A1 | = −42, |A2 | = −28,


62CHAPTER 5. LINEAR MODELS AND MATRIX ALGEBRA (CONTINUED)

we have
−42 −28
x1 = = 3, x2 = = 2.
−14 −14

Example 5.5.2

5x1 + 3x2 = 30;


6x1 − 2x2 = 8.

We then have

5 3
|A| = = −28;
6 −2

30 3
|A1 | = = −84;
8 −2

5 30
|A2 | = = −140.
6 8

Therefore, by Cramer’s rule, we have

|A1 | −84 |A2 | −140


x̄1 = = = 3 and x̄2 = = = 5.
|A| −28 |A| −28

Example 5.5.3

x1 + x2 + x3 = 0
12x1 + 2x2 − 3x3 = 5
3x1 + 4x2 + x3 = −4.
5.5. CRAMER’S RULE 63

In the form of matrix


    
1 1
1  x1   0 
    
12 2 −3 x  =  5  .
   2  
    
3 4 1 x3 −4

We have
|A| = 35, |A3 | = 35, and thus x3 = 1.

Example 5.5.4

7x1 − x2 − x3 = 0
10x1 − 2x2 + x3 = 8
6x1 + 3x2 − 2x3 = 7.

We have

|A| = −61, |A1 | = −61, |A2 | = −183, |A3 | = −244.

Thus
|A1 |
x̄1 = = 1,
|A|
|A2 |
x̄2 = = 3,
|A|
|A3 |
x̄3 = = 4.
|A|

Note on Homogeneous-Equation System

A linear-equation system Ax = d is said to be a homogeneous-equation


system if d = 0, i.e., if Ax = 0. If |A| ̸= 0, x̄ = 0 is a unique solution of
Ax = 0 since x̄ = A−1 0 = 0. This is a "trivial solution." Thus, the only
way to get a nontrivial solution from the homogeneous-equation system
64CHAPTER 5. LINEAR MODELS AND MATRIX ALGEBRA (CONTINUED)

is to have |A| = 0, i.e., A is singular. In this case, Cramer’s rule is not


directly applicable. Of course, this does not mean that we cannot obtain
solutions; it means only that the solution is not unique. In fact, it has an
infinite number of solutions.
If r(A) = k < n, we can delete n − k dependent equations from the
homogeneous-equation system Ax = 0, and then apply Cramer’s rule to
any k variables, say (x1 , . . . , xk ) whose coefficient matrix has a rank k and
constant term in equation i is −(ai,k+1 xk+1 + . . . , ain xn ).

Example 5.5.5

a11 x1 + a12 x2 = 0,
a21 x2 + a22 x2 = 0.

If |A| = 0, then its rows are linearly dependent. As a result, one of two
equations is redundant. By deleting, say, the second equation, we end up
with one equation with two variables. The solutions are

a12
x̄1 = − x2 if a11 ̸= 0
a11

Overview on Solution Outcomes for a linear-Equation System

Proposition 5.5.1 A necessary and sufficient condition for the existence of solu-
tion for a linear-equation system Ax = d is that the rank of A and the rank of
the added matrix [A; d] are the same, i.e.,

r(A) = r([A; d]).

For a linear-equation system Ax = d, our discussion can be summa-


rized as in the following table.

Common questions

Powered by AI

If the determinant of matrix B (|B|) is non-zero, the inverse of the matrix B exists. The inverse is determined using the formula B⁻¹ = 1/|B| * adj(B), where adj(B) is the adjugate matrix, which is the transpose of the cofactor matrix C. For matrix B, the cofactor matrix C is calculated from the minors of B. For example, the cofactor matrix given is C = [ [21, 6, -9], [-7, 31, 3], [5, -8, 12] ], and its transpose (adjugate) is used to compute B⁻¹ = 1/99 * [ [21, -7, 5], [6, 31, -8], [-9, 3, 12] ].

Cramer's Rule cannot be applied directly to a homogeneous linear equation system Ax = 0 when A is singular (|A| = 0) because it requires a non-zero determinant. However, solutions can still be obtained by recognizing redundancy in the system's equations and deleting dependent equations. This can reduce the system to include only independent equations for which other methods or reduced matrices can be used to find an infinite number of solutions .

To solve a linear equation system Ax = d using Cramer's Rule, follow these steps: 1) Check that |A|, the determinant of matrix A, is non-zero. 2) For each unknown x_j, compute |A_j|, the determinant of the matrix obtained by replacing the j-th column of A with the vector d. 3) Calculate each variable as x_j = |A_j| / |A|. For example, for the system with matrix A = [ [2, 3], [4, -1] ] and d = [12, 10], we calculate |A| = -14, |A_1| = -42, |A_2| = -28, leading to solutions x_1 = 3 and x_2 = 2 .

In a homogeneous linear equation system Ax = 0, when matrix A is non-singular (|A| ≠ 0), the unique solution is the trivial solution x = 0. However, if A is singular (|A| = 0), the system may have infinitely many solutions, as the rank condition allows for more variables than independent equations. Solutions are not unique due to the presence of linearly dependent rows in A, implying redundancy in equations .

Linearly dependent rows in a matrix imply that the system of equations they represent is not independent, leading to redundancy. This affects solution uniqueness, particularly in homogeneous systems where a non-zero determinant is needed for Cramer's Rule. In the absence of such, it suggests there may be infinitely many solutions since some equations can be expressed as linear combinations of others .

The cofactor matrix is essential in calculating a matrix's inverse, as it's used to compute the adjugate matrix, which plays a pivotal role in finding the inverse. Each element in the cofactor matrix is a minor corresponding to a matrix element, adjusted by a checkerboard pattern of signs. The adjugate, being the transpose of the cofactor matrix, is multiplied by 1/|A| to yield the inverse of matrix A .

When the determinant is zero in a homogeneous linear system Ax = 0, indicating the matrix is singular, you cannot use Cramer's Rule. Instead, identify linearly dependent rows, remove redundant equations, and work with the remaining independent equations to express the system under linear combinations. For instance, if a11x1 + a12x2 = 0 is left after removing a redundant equation, the system would involve forming relations between variables like ¯x1 = −a12/a11 x2, assuming a11 is non-zero, thus yielding a system with infinitely many solutions .

For each unknown x_j in the system represented by Ax = d, replace the j-th column of matrix A with vector d to form a new matrix A_j. Compute the determinant |A_j| and use Cramer's Rule to find x_j = |A_j| / |A|. For instance, with A = [ [5, 3], [6, -2] ] and d = [30, 8], we find |A| = -28, |A_1| = -84 (replacing the first column), and |A_2| = -140 (replacing the second column), resulting in solutions x_1 = 3 and x_2 = 5 .

The rank of matrix A determines the number of linearly independent rows or columns, and the determinant indicates non-singularity when non-zero. For a non-zero determinant, rank equals the total number of lines (full rank), implying a unique solution if the augmented matrix rank is the same. A zero determinant suggests linear dependency among lines, reducing rank, leading to possible infinite solutions or no solutions if the augmented matrix does not match A's reduced rank .

A necessary and sufficient condition for the existence of a solution for a linear equation system Ax = d is that the rank of A and the rank of the augmented matrix [A; d] are the same, i.e., r(A) = r([A; d]). This ensures consistency within the system allowing for a valid solution .

You might also like