Matrices-Unit13.mws

MATRICES AND MATRIX OPERATIONS: Unit 13

Dr. Wlodzislaw Kostecki

The Papua New Guinea University of Technology (PNGUT)

Department of Electrical and Communication Engineering

Lae, Morobe Province

Papua New Guinea

Copyright © 2000 by Wlodzislaw Kostecki

All rights reserved

-------------------------------------------------------------------

(13) The adjoint of a matrix

OBJECTIVES :

To define the adjoint or adjugate of a square matrix.

To provide alternative methods of computing the adjoint of a matrix.

To introduce the concept of a cofactor matrix associated with a matrix and show how it may be used to obtain the adjoint of the matrix.

To specify and illustrate some properties of the adjoint matrix.

To define the self-adjoint matrix and investigate its properties.

> restart : with(linalg, adj, adjoint, coldim, det, diag, inverse, minor, multiply, rowdim, scalarmul, transpose) :

The adjoint or adjugate of a matrix is the transpose of the matrix, obtained by replacing each element by its cofactor ( signed minor ).

The adjoint of a matrix is defined only for square matrices , irrespective of whether or not the matrix is non-singular.

Consider a ( 3 × 3 ) matrix [ A ] given as

> A := matrix(3, 3, [a[11], a[12], a[13], a[21], a[22], a[23], a[31], a[32], a[33]]) : A = matrix(A) ;

A = matrix([[a[11], a[12], a[13]], [a[21], a[22], a...

The matrix adjoint to matrix [ A ] is a ( 3 × 3 ) matrix, which can be obtained using either of the following alternative methods.

Method 1 . Using the adjoint function:

> `adj(A)` := adjoint(A) : Adj(A) = matrix(`adj(A)`) ;

Adj(A) = matrix([[a[22]*a[33]-a[23]*a[32], -a[12]*a...

Method 2 . Using the adj function:

> `adj(A)` := adj(A) : Adj(A) = matrix(`adj(A)`) ;

Adj(A) = matrix([[a[22]*a[33]-a[23]*a[32], -a[12]*a...

Exemplarily, consider a ( 3 × 3 ) matrix [ B ] given as

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

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

The adjoint of matrix [ B ] is the following ( 3 × 3 ) matrix:

> `adj(B)` := adjoint(B) : Adj(B) = matrix(`adj(B)`) ;

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

* * *

N.B. A matrix obtained by replacing each element of a square matrix [ A ] by its cofactor is called by some sources a cofactor matrix associated with [ A ]. The cofactor matrix may be used to obtain both the matrix adjoint and inverse to [ A ].

[ For the inverse of a matrix, refer to Unit (14). ]

Exemplarily, consider a ( 3 × 3 ) matrix [ A ] given as

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

A = matrix([[2, 3, 4], [-5, 5, 6], [7, 8, 9]])

and obtain the matrix adjoint to [ A ].

Step 1 . Declare the cofactor matrix associated with [ A ]:

> cofactor(A) := matrix(3, 3) :

Step 2 . Compute cofactors of each element of [ A ] using the double for -loop construct:

> for i to rowdim(A) do for j to coldim(A) do cofactor(A)[i,j] := (-1)^(i+j)*det(minor(A, i, j)) : print(Cofactor(a[i,j]) = cofactor(A)[i,j]) : od : od :

Cofactor(a[1,1]) = -3

Cofactor(a[1,2]) = 87

Cofactor(a[1,3]) = -75

Cofactor(a[2,1]) = 5

Cofactor(a[2,2]) = -10

Cofactor(a[2,3]) = 5

Cofactor(a[3,1]) = -2

Cofactor(a[3,2]) = -32

Cofactor(a[3,3]) = 25

Step 3 . Input/display the cofactor matrix:

> cofactor(A) := matrix(cofactor(A)) : Cofactor(A) = matrix(cofactor(A)) ;

Cofactor(A) = matrix([[-3, 87, -75], [5, -10, 5], [...

Step 4 . Compute the transpose of the cofactor matrix:

> `transp(cofactor(A))` := transpose(cofactor(A)) :

> Transp(Cofactor(A)) = matrix(`transp(cofactor(A))`) ;

Transp(Cofactor(A)) = matrix([[-3, 5, -2], [87, -10...

Step 5 . Verify this result by computing the matrix adjoint to [ A ]:

> `adj(A)` := adjoint(A) : Adj(A) = matrix(`adj(A)`) ;

Adj(A) = matrix([[-3, 5, -2], [87, -10, -32], [-75,...

Both matrices of Steps 4 and 5 are equal.

* * *

N.B. The product of a square matrix [ A ] and transpose of the cofactor matrix associated with [ A ] equals the product of the determinant of [ A ] and the unit matrix, which results in a scalar matrix

[ A ] Transp(Cofactor [ A ] ) = (Det [ A ] ) [ U ]

Exemplarily, consider the same ( 3 × 3 ) matrix [ A ] as before.

(a) The product [ A ] Transp(Cofactor [ A ] ) is the following ( 3 × 3 ) scalar matrix:

> `A transp(cofactor(A))` := evalm(A &* transpose(cofactor(A))) :

> A*Transp(Cofactor(A)) = matrix(`A transp(cofactor(A))`) ;

A*Transp(Cofactor(A)) = matrix([[-45, 0, 0], [0, -4...

(b) The unit matrix [ U ] appropriately sized for this case is

> U := diag(1, 1, 1) : U = matrix(U) ;

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

(c) The product ( Det [ A ] ) [ U ] is the following ( 3 × 3 ) scalar matrix:

> `det(A) U` := evalm(det(A) * U) : Det(A)*U = matrix(`det(A) U`) ;

Det(A)*U = matrix([[-45, 0, 0], [0, -45, 0], [0, 0,...

Both product matrices of (a) and (c) are equal.

* * *

N.B. The product of a square matrix and its adjoint obeys the commutative law . The product matrix is the unit matrix multiplied by the determinant of the square matrix, which results in a scalar matrix

(Adj [ A ] ) [ A ] = [ A ] (Adj [ A ] ) = (Det [ A ] ) [ U ]

Exemplarily, consider a ( 3 × 3 ) matrix [ A ] given as

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

A = matrix([[1, 2, 3], [4, 0, 1], [2, 3, 5]])

The adjoint of the matrix, Adj [ A ], is the following ( 3 × 3 ) matrix:

> `adj(A)` := adjoint(A) : Adj(A) = matrix(`adj(A)`) ;

Adj(A) = matrix([[-3, -1, 2], [-18, -1, 11], [12, 1...

(a) The product (Adj [ A ] ) [ A ] is the following ( 3 × 3 ) scalar matrix:

> `adj(A) A` := multiply(`adj(A)`, A) : Adj(A) * A = matrix(`adj(A) A`) ;

Adj(A)*A = matrix([[-3, 0, 0], [0, -3, 0], [0, 0, -...

(b) The product [ A ] (Adj [ A ] ) is the following ( 3 × 3 ) scalar matrix:

> `A adj(A)` := multiply(A, `adj(A)`) : A * `Adj(A)` = matrix(`A adj(A)`) ;

A*`Adj(A)` = matrix([[-3, 0, 0], [0, -3, 0], [0, 0,...

(c) With the appropriately sized unit matrix, i.e.

> U = matrix(U) ;

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

and the determinant of [ A ], which is

> `det(A)` := det(A) : Det(A) = `det(A)` ;

Det(A) = -3

the product (Det [ A ] ) [ U ] is the following ( 3 × 3 ) scalar matrix:

> `det(A) U` := scalarmul(U, det(A)) : Det(A)*U = matrix(`det(A) U`) ;

Det(A)*U = matrix([[-3, 0, 0], [0, -3, 0], [0, 0, -...

All three product matrices are equal.

* * *

N.B. The adjoint of the product of two matrices is the product of the two matrix adjoints but in the reverse order

Adj( [ A ] [ B ] ) = Adj [ B ] Adj [ A ]

Exemplarily, consider two ( 3 × 3 ) matrices [ A ] and [ B ] given as

> A := matrix(3, 3, [1, -2, 3, 4, 7, 1, 2, 3, -4]) : B := matrix(3, 3, [2, 5, -1, 3, 4, 0, 6, -1, 2]) :

> A = matrix(A) ; B = matrix(B) ;

A = matrix([[1, -2, 3], [4, 7, 1], [2, 3, -4]])

B = matrix([[2, 5, -1], [3, 4, 0], [6, -1, 2]])

(a) The adjoint of the product of the two matrices, Adj( [ A ] [ B ] ) , is the following ( 3 × 3 ) matrix:

> `adj(AB)` := adjoint(multiply(A, B)) : Adj(A * B) = matrix(`adj(AB)`) ;

Adj(A*B) = matrix([[-418, 70, -223], [372, -85, 203...

(b) The product of the two matrix adjoints multiplied in the reverse order, Adj [ B ] Adj [ A ], is the following ( 3 × 3 ) matrix:

> `adj(B) adj(A)` := multiply(adjoint(B), adjoint(A)) : Adj(B) * Adj(A) = matrix(`adj(B) adj(A)`) ;

Adj(B)*Adj(A) = matrix([[-418, 70, -223], [372, -85...

* * *

N.B. A matrix that equals its own adjoint is said to be self-adjoint .

Exemplarily, consider a ( 3 × 3 ) matrix [ A ] given as

> A := matrix(3, 3, [-4, -3, -3, 1, 0, 1, 4, 4, 3]) : A = matrix(A) ;

A = matrix([[-4, -3, -3], [1, 0, 1], [4, 4, 3]])

The adjoint of matrix [ A ] is the following ( 3 × 3 ) matrix:

> `adj(A)` := adjoint(A) : Adj(A) = matrix(`adj(A)`) ;

Adj(A) = matrix([[-4, -3, -3], [1, 0, 1], [4, 4, 3]...

Notice that the determinant of a self-adjoint matrix is unity , viz.

> `det(A)` := det(A) : Det(A) = `det(A)` ;

Det(A) = 1

* * *

N.B. Raising a self-adjoint matrix to any (positive or negative) odd power does not change the matrix, while raising it to any (positive or negative) even power returns a unit matrix .

Consider the same self-adjoint matrix [ A ] as before.

(a) Raising [ A ] to the powers 3 and -5 yields the same matrix:

> `A^3` := evalm(A^3) : `A^(-5)` := evalm(A^(-5)) : A^3=matrix(`A^3`) ; A^` -5`=matrix(`A^(-5)`) ;

A^3 = matrix([[-4, -3, -3], [1, 0, 1], [4, 4, 3]])

A^` -5` = matrix([[-4, -3, -3], [1, 0, 1], [4, 4, 3...

It follows immediately from the above that inversion of a self-adjoint matrix does not change the matrix, viz.

> `inv(A)` := inverse(A) : Inv(A) = matrix(`inv(A)`) ;

Inv(A) = matrix([[-4, -3, -3], [1, 0, 1], [4, 4, 3]...

(b) Raising [ A ] to the powers 4 and -6 yields the corresponding unit matrix:

> `A^4` := evalm(A^4) : `A^(-6)` := evalm(A^(-6)) : A^4=matrix(`A^4`) ; A^` -6`=matrix(`A^(-6)`) ;

A^4 = matrix([[1, 0, 0], [0, 1, 0], [0, 0, 1]])

A^` -6` = matrix([[1, 0, 0], [0, 1, 0], [0, 0, 1]])...

[ Refer to Unit (14) for the matrix inverse and to Unit (15) for integer exponentiation of matrices. ]

Since the determinant of both a self-adjoint and unit matrix is unity , it follows from the above that the determinant of a self-adjoint matrix raised to any non- zero integer power is unity . Exemplarily,

> `det(A^3)` := det(`A^3`) : `det(A^(-6))` := det(`A^(-6)`) :

> Det(A^3) = `det(A^3)` ; Det(A^` -6`) = `det(A^(-6))` ;

Det(A^3) = 1

Det(A^` -6`) = 1

* * *

Proceed to Unit (14) for " The inverse of a matrix ".

-------------------------------------------------------------------