Section 1.5

Inverses of Square Matrices

>

>

Introduction

Consider real numbers. Given the equation

ax = b.

If a is not equal to zero then we can solve the equation for x

1/a a x = 1/a b or a^`-1`*a x = a^`-1`*b

x = b/a or x = a^`-1`*b

What about linear systems of equations Ax = b ? x = A^`-1`*b ?

Real Numbers

a 1/a = 1 = 1/a a or a a^`-1` = 1 = a^`-1` a

Square Matrices

A A^`-1` = I = A^`-1` A

Coefficient Matrix

Let us start with some examples of matrices associated with systems of linear equations with

an equal number of equations as unknowns.

Example 1: The augmented matrix of a nonhomogeneous system of linear equations is

> AUG:=matrix([[1,3,6,7],[1,5,8,4],[3,13,22,15]]);

AUG := matrix([[1, 3, 6, 7], [1, 5, 8, 4], [3, 13, ...

Apply Gauss elimination to AUG :

> B:=gausselim(AUG);

B := matrix([[1, 3, 6, 7], [0, 2, 2, -3], [0, 0, 0,...

What does matrix B tell us about the solution set of the system of equations represented by AUG? Let us apply backsubstitution to solve the system:

> backsub(B);

vector([23/2-3*_t[1], -3/2-_t[1], _t[1]])

The system is consistent with infinitely many solutions.For this system, let us investigate the associated coefficient matrix:

> A:=matrix([[1,3,6],[1,5,8],[3,13,22]]);

A := matrix([[1, 3, 6], [1, 5, 8], [3, 13, 22]])

Apply Gauss elimination

> B1:=gausselim(A);

B1 := matrix([[1, 3, 6], [0, 2, 2], [0, 0, 0]])

>

This example shows that the underlying system has infinitely many solutions . Note that matrix

B 1 , in echelon form corresponding to the coefficient matrix A, has a zero row.

Example 2: Alter the matrix AUG slightly .Consider the augmented matrix

> AUG:=matrix([[1,3,6,7],[1,5,8,4],[3,13,22,1]]);

AUG := matrix([[1, 3, 6, 7], [1, 5, 8, 4], [3, 13, ...

Apply Gauss elimination to AUG

> B:=gausselim(AUG);

B := matrix([[1, 3, 6, 7], [0, 2, 2, -3], [0, 0, 0,...

What does the matrix B tell us about the solution set of the system of equations represented by AUG?

Let us apply backsubstitution to solve the system

> backsub(B);

Error, (in backsub) inconsistent system

For this system let us investigate the associated coefficient matrix. The coefficient matrix A is

> A:=matrix([[1,3,6],[1,5,8],[3,13,22]]);

A := matrix([[1, 3, 6], [1, 5, 8], [3, 13, 22]])

Let us apply Gauss elimination:

> B1:=gausselim(A);

B1 := matrix([[1, 3, 6], [0, 2, 2], [0, 0, 0]])

>

The slight modification in the augmented matrix leads to a system that is inconsistent . Note that the

matrix B 1 ,in echelon form corresponding to the coefficient matrix A, does have also a zero row.

Example 3: Now alter the matrix AUG of Example 2. Consider the augmented matrix

> AUG:=matrix([[1,3,6,7],[1,5,8,4],[3,13,2,1]]);

AUG := matrix([[1, 3, 6, 7], [1, 5, 8, 4], [3, 13, ...

Apply gauss elimination to AUG

> B:=gausselim(AUG);

B := matrix([[1, 3, 6, 7], [0, 2, 2, -3], [0, 0, -2...

What does matrix B tell us about the solution set of the system of equations represented by AUG?

Let us apply backsubstitution to solve the system:

> backsub(B);

vector([47/5, -11/5, 7/10])

>

For this system let us investigate the associated coefficient matrix:

> A:=matrix([[1,3,6],[1,5,8],[3,13,2]]);

A := matrix([[1, 3, 6], [1, 5, 8], [3, 13, 2]])

Apply Gauss elimination:

> B1:=gausselim(A);

B1 := matrix([[1, 3, 6], [0, 2, 2], [0, 0, -20]])

>

This last modification led to a system that has a unique solution . Note that the matrix B[1] , in

echelon form corresponding to the coefficient matrix A, is not zero.

********************************************************************

In Examples 1 and 2 , the coefficient matrix associated with the augmented matrix

AUG determines whether the system represented by AUG: has a unique solution or not

Recall that in solving the scalar equation a*x = b where a and b are real numbers,

one of the following rules must hold:

If a = 0 and b = 0 , the system has infinitely many solutions

If a = 0 and b is not equal to zero, the system has no solution

If a is not equal to zero, the system will have a unique solution given by x = a^`-1`*b

( a^`-1` is the multiplicative inverse of a).

For systems of linear equations Ax = B where A and B are matrices and x is the unknown

quantity, we have the following analogous situation:

As in Example 1 , the system of linear equations has infinitely many solutions and in

Example 2 the system has no solution. In these two cases, we say the coefficient matrix

is " Singular ". Note that the reduced matrix B[1] in echelon form has at least one zero row.

In Example 3 , the system of linear equations has a unique solution and the coefficient matrix

is " Nonsingular "; that is, the matrix A must have a multiplicative inverse. Note that the reduced

matrix B[1] in echelon form has no zero rows.

Nonsingular Matrix

Example 4: Consider the matrix

> A:=matrix([[2,4,6],[4,6,7],[8,5,2]]);

A := matrix([[2, 4, 6], [4, 6, 7], [8, 5, 2]])

>

The inverse of A is

> B:=linalg[inverse](A);

B := matrix([[23/22, -1, 4/11], [-24/11, 2, -5/11],...

>

To verify this

> AB=multiply(A,B);

AB = matrix([[1, 0, 0], [0, 1, 0], [0, 0, 1]])

> BA=multiply(B,A);

BA = matrix([[1, 0, 0], [0, 1, 0], [0, 0, 1]])

>

**************************************************************************

An nxn matrix A is a nonsingular matrix

if and only if there is an nxn matrix B so that the product

AB = BA = I n

where I n is the identity matrix. The matrix B is called the inverse of A. Otherwise, A is called a singular matrix.

If an nxn matrix has an inverse, then the inverse is unique

**************************************************************************

Some Properties of a Nonsingular matrix

Example 5: Consider the matrix

> A:=matrix([[1,2,0],[0,1,1],[1,2,1]]);

A := matrix([[1, 2, 0], [0, 1, 1], [1, 2, 1]])

Its inverse A[1] is:

> A1:= linalg[inverse](A);

A1 := matrix([[-1, -2, 2], [1, 1, -1], [-1, 0, 1]])...

>

Is the inverse of the inverse of A equal to A?

> inv(inv(A)) =linalg[inverse](A1);

inv(inv(A)) = matrix([[1, 2, 0], [0, 1, 1], [1, 2, ...

>

********************************************************************

If A is an nxn invertible matrix, the inverse of the inverse of A is A itself.

********************************************************************

Consider another matrix B and its product with matrix A:

> B:=matrix([[0,2,1],[1,1,0],[1,2,1]]);

B := matrix([[0, 2, 1], [1, 1, 0], [1, 2, 1]])

> C:=multiply(A,B);

C := matrix([[2, 4, 1], [2, 3, 1], [3, 6, 2]])

>

Take the inverse of the matrices A and B. Let A[1] = A^`-1` and B[1] = B^`-1` .

> A1:= linalg[inverse](A);

A1 := matrix([[-1, -2, 2], [1, 1, -1], [-1, 0, 1]])...

> B1:=linalg[inverse](B);

B1 := matrix([[-1, 0, 1], [1, 1, -1], [-1, -2, 2]])...

What is the relation between the inverse of the product AB and the product of the inverses of

A and B?

Is the product of two nonsingular matrices nonsingular?

> inv(A)*inv(B) =multiply(A1,B1);

inv(A)*inv(B) = matrix([[-3, -6, 5], [1, 3, -2], [0...

> inv(B)*inv(A) =multiply(B1,A1);

inv(A)*inv(B) = matrix([[0, 2, -1], [1, -1, 0], [-3...

> inv(AB) = evalm(linalg[inverse](C));

inv(AB) = matrix([[0, 2, -1], [1, -1, 0], [-3, 0, 2...

>

Compare A^`-1`*B^`-1` and B^`-1`*A^`-1` to the inverse, [AB]^`-1` , of the product AB. What do you conclude?

*********************************************************************

If A and B are two nxn invertible matrices, then the inverse of AB is equal to the inverse

of B times the inverse of A; that is, [AB]^`-1` = B^`-1`*A^`-1`

*********************************************************************

Obtain the reduced echelon forms of the matrices A and B and find a condition under which the

multiplicative inverse exists.

Example 6: Take the following two matrices

> A:=matrix([[5,6,7],[5,7,2],[6,7,11]]);

A := matrix([[5, 6, 7], [5, 7, 2], [6, 7, 11]])

> B:=matrix([[5,6,7],[5,7,2],[15,19,16]]);

B := matrix([[5, 6, 7], [5, 7, 2], [15, 19, 16]])

>

The reduced echelon form of the matrices A and B are:

> A1:=rref(A);

A1 := matrix([[1, 0, 0], [0, 1, 0], [0, 0, 1]])

> B1:=rref(B);

B1 := matrix([[1, 0, 37/5], [0, 1, -5], [0, 0, 0]])...

>

Is there a difference between the reduced row echelon form of the matrix A and the

reduced echelon form of the matrix B?

Matrix A is row equivalent to the identity matrix . That is,

by applying a sequence of elementary row operations to matrix A

we obtained the identity matrix.Matrix B is not row equivalent to

the identity matrix.

Which one of them has an inverse?

> linalg[inverse](A);

matrix([[63/8, -17/8, -37/8], [-43/8, 13/8, 25/8], ...

>

> linalg[inverse](B);

Error, (in linalg[inverse]) singular matrix

>

Matrix A has an inverse while the inverse of the matrix B does not exist.

**************************************************************************

An nxn matrix A is invertible if and only if it is row equivalent to the identity matrix.

**************************************************************************

Nonsingular Matrices and Systems of Linear Equations

Example 7: Consider the homogeneous system of linear equations whose augmented matrix is

> HS:=matrix([[5,6,7,0],[5,7,2,0],[6,7,11,0]]);

HS := matrix([[5, 6, 7, 0], [5, 7, 2, 0], [6, 7, 11...

>

The solution can be obtained by performing Gauss elimination and then applying the

backsubstitution algorithm.

> HS1:=gausselim(HS);

HS1 := matrix([[5, 6, 7, 0], [0, 1, -5, 0], [0, 0, ...

>

> backsub(HS1);

vector([0, 0, 0])

The homogeneous system of equations has the trivial solution. What can you say about the

coefficient matrix of HS ? For example, does the inverse exist? The coefficient matrix of HS is

> A:=matrix([[5,6,7],[5,7,2],[6,7,11]]);

A := matrix([[5, 6, 7], [5, 7, 2], [6, 7, 11]])

Its inverse is

> linalg[inverse](A);

matrix([[63/8, -17/8, -37/8], [-43/8, 13/8, 25/8], ...

>

************************************************************************

Example 8: Consider a nonhomogeneous system NHS associated with an invertible matrix. A

nonhomogeneous system of linear equations has the following augmented matrix

> NHS:=matrix([[5,6,7,1],[5,7,2,15],[6,7,11,23]]);

NHS := matrix([[5, 6, 7, 1], [5, 7, 2, 15], [6, 7, ...

>

The solution can be obtained by performing Gauss elimination and then applying the

backsubstitution algorithm.

> NHS1:=gausselim(NHS);

NHS1 := matrix([[5, 6, 7, 1], [0, 1, -5, 14], [0, 0...

> backsub(NHS1);

vector([-1043/8, 727/8, 123/8])

>

This system has a unique solution

*********************************************************************

If the coefficient matrix is nonsingular ( invertible), then the

nonhomogeneous system of linear equations has a unique

solution.

If the coefficient matrix is nonsingular( invertible), then the only

solution of the homogeneous system of linear equations is the

trivial solution.

*********************************************************************

SUMMARY

An nxn matrix A is non-singular ( invertible)

if and only if

A is row equivalent to the identity matrix

if and only if

The homogeneous system whose coefficient matrix is A has the trivial solution

if and only if

The nonhomogeneous system whose coefficient matrix is A has a unique solution

********************************************************************

Finding the Inverse

The steps in the Procedure are

1. Augment the given nxn matrix A with the identity matrix I n of the same dimension; that is,

form the matrix [A : I n ]

2. Apply a sequence of elementary row operations to convert the matrix A to the identity

matrix. The same sequence of operations will convert the identity matrix to the desired inverse

of the matrix A. Why?

Apply the demonstration mode of inverse function from "linmat" to go through the steps

of finding the inverse of A, choosing the Gauss-Jordan procedure from the menu.

Example 9: Consider the matrix A

> A:=matrix([[1,4,6],[6,4,9],[1,7,9]]);

>

> inverse(A);

` `

`The purpose of this function is to find the invers...

`Gauss-Jordan algorithm or the Adjoint method. For ...

`?inverse at the Maple prompt`

` `

`You entered the matrix`, A = matrix([[1, 4, 6], [6...

` `

`Select one of the following modes:`

   1. Demonstration mode

   2. Interactive mode

   3. No Intermediate steps. Just give me the answer

1;

Which method do you prefer?

      1. Gauss-Jordan method

      2. Adjoint method

<Select from 1; or 2;>

1;

`In this method we find the inverse of the matrix A...

` [A:I], where I is the identity matrix. Then Use e...

`row operations to reduce it to a form [I:B] where ...

` `

`The original augmented matrix is :`, matrix([[1, 4...

` `

`Apply the elementary row operations to [A:I] and c...

`the matrix to its reduced row echelon form [I:B]`

` `

< type ; and press Enter to continue ?topic for help  exit; to quit >

;

` `

` `

`We perform gauss elimination on :`

matrix([[1, 4, 6, 1, 0, 0], [6, 4, 9, 0, 1, 0], [1,...

` `

< type ; and press Enter to continue ?topic for help  exit; to quit >

;

` `

` `

`multipliy row`, 1, `by`, -6, `and add that to row`...

`To get :`, matrix([[1, 4, 6, 1, 0, 0], [0, -20, -2...

` `

< type ; and press Enter to continue ?topic for help  exit; to quit >

;

` `

`multipliy row`, 1, `by`, -1, `and add that to row`...

`To get :`, matrix([[1, 4, 6, 1, 0, 0], [0, -20, -2...

` `

< type ; and press Enter to continue ?topic for help  exit; to quit >

;

` `

`Divide row `, 2, `by `, -20

`To get : `, matrix([[1, 4, 6, 1, 0, 0], [0, 1, 27/...

` `

< type ; and press Enter to continue ?topic for help  exit; to quit >

;

` `

`Perform elimination on column`, 2

` `

`multipliy row`, 2, `by`, -3, `and add that to row`...

`To get :`, matrix([[1, 4, 6, 1, 0, 0], [0, 1, 27/2...

` `

< type ; and press Enter to continue ?topic for help  exit; to quit >

;

` `

`multipliy row`, 2, `by`, -4, `and add that to row`...

`To get :`, matrix([[1, 0, 3/5, -1/5, 1/5, 0], [0, ...

` `

< type ; and press Enter to continue ?topic for help  exit; to quit >

;

` `

`Divide row `, 3, `by `, -21/20

`To get : `, matrix([[1, 0, 3/5, -1/5, 1/5, 0], [0,...

` `

< type ; and press Enter to continue ?topic for help  exit; to quit >

;

` `

` `

`multipliy row`, 3, `by`, -27/20, `and add that to ...

`To get :`, matrix([[1, 0, 3/5, -1/5, 1/5, 0], [0, ...

` `

< type ; and press Enter to continue ?topic for help  exit; to quit >

;

` `

`multipliy row`, 3, `by`, -3/5, `and add that to ro...

`To get :`, matrix([[1, 0, 0, -9/7, 2/7, 4/7], [0, ...

` `

< type ; and press Enter to continue ?topic for help  exit; to quit >

;

` `

`The augmented matrix [A:I] is now in the form [I:B...

`Therefore the inverse of A=`, matrix([[1, 4, 6], [...

`is `, matrix([[-9/7, 2/7, 4/7], [-15/7, 1/7, 9/7],...

` `

`We can verify this by showing`, matrix([[1, 4, 6],...

` `

`This is the end of the inverse procedure. Choose o...

`the function again to learn these two algorithms f...

> ;

>

Inverses and Systems of Linear Equations

As noted in Example 8, if the coefficient matrix of a system of linear equations A*x = b is invertible, then the system has a unique solution given by A^`-1`*b .

Example 10: Consider the system of equations

> eq1:=x1+4*x2+6*x3=11: eq2:=6*x1+4*x2+9*x3=19:
eq3:=x1+7*x2+9*x3=35: print(eq1); print(eq2); print(eq3);

x1+4*x2+6*x3 = 11

6*x1+4*x2+9*x3 = 19

x1+7*x2+9*x3 = 35

>

This system can be written as Ax = b where:

>

> A:=matrix([[1,4,6],[6,4,9],[1,7,9]]);

A := matrix([[1, 4, 6], [6, 4, 9], [1, 7, 9]])

>

> b:=matrix([[11],[19],[35]]);

b := matrix([[11], [19], [35]])

Check if the inverse of the matrix A exists (use the nostep mode):

>

> inverse(A);

` `

`Gauss-Jordan algorithm or the Adjoint method. For ...

`?inverse at the Maple prompt`

` `

`You entered the matrix`, A = matrix([[1, 4, 6], [6...

` `

`Select one of the following modes:`

   1. Demonstration mode

   2. Interactive mode

   3. No Intermediate steps. Just give me the answer

> 3;

`The inverse of the matrix is `

A^`-1` = matrix([[-9/7, 2/7, 4/7], [-15/7, 1/7, 9/7...

>

>

Thus the inverse of A is:

> B:=matrix([[-9/7,2/7,4/7],[-15/7,1/7,9/7],
[38/21,-1/7,-20/21]]);

B := matrix([[-9/7, 2/7, 4/7], [-15/7, 1/7, 9/7], [...

>

Since the inverse of the matrix A is the matrix B multiply, both sides of Ax = b by B to get the solution:

> x:=multiply(B,b);

x := matrix([[79/7], [169/7], [-113/7]])

>

This solution coincides with the solution that we get directly from:

> solve({eq1,eq2,eq3},{x1,x2,x3});

{x2 = 169/7, x3 = -113/7, x1 = 79/7}

>

Conditions for A^`-1` to exist

********************************************************************

The following conditions for an n x n matrix are equivalent:

i.) A is invertible (non-singular), i.e. A^`-1` exists.

ii.) A is row equivalent to the identity matrix I.

iii.) The system Ax=b has a solution for every column vector b .

iv.) The matrix A can be expressed as a product of elementary matrices.

v.) The span of the column vectors of A is R^n

********************************************************************

Exercises

1-13(odd), 16, 18, 19, 21, 23, 24, 35.