Matrices-Unit15.mws

MATRICES AND MATRIX OPERATIONS: Unit 15

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

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

(15) Integer exponentiation of matrices

OBJECTIVES :

To define the operation of integer exponentiation of square matrices.

To provide alternative methods of exponentiation operation with Maple .

To provide definitions and examples of nilpotent and idempotent matrices and illustrate their properties.

To show the effect of exponentiation operation on specific types of matrices.

To specify and illustrate some properties of exponentiation operation.

To stress and show that a square matrix raised to the power zero yields in Maple the scalar value one , and not a zero matrix.

> restart : with(linalg, definite, det, diag, eigenvals, inverse, multiply, transpose) :

Positive- and negative-integer exponentiation (integer power) of a matrix is defined only for square matrices. Integer exponentiation of a matrix is multiple multiplication of the matrix with itself. Therefore, to satisfy the multiplication conformability rule , this operation requires that a matrix must be square.

A. Positive-integer power of a matrix

The positive-integer power of a square matrix of order ( m × m ) or ( n × n ) is a matrix of the same order. The resultant is a product matrix that is obtained by multiple multiplication of a given matrix with itself. For example, the square of the matrix [ A ] is defined by the relation

[ A ] ^ 2 = [ A ] [ A ]

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

> A := matrix(2, 2, [a[11], a[12], a[21], a[22]]) : A = matrix(A) ;

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

The square of the matrix, [ A ] ^ 2 , may be obtained using either of the following alternative methods.

Method 1 . Using the evalm function:

> `A^2` := evalm(A^2) : A^2 = matrix(`A^2`) ;

A^2 = matrix([[a[11]^2+a[12]*a[21], a[11]*a[12]+a[1...

Method 2 . Using the multiply function:

> `A^2` := multiply(A, A) : A^2 = matrix(`A^2`) ;

A^2 = matrix([[a[11]^2+a[12]*a[21], a[11]*a[12]+a[1...

As a numerical example, compute the square of a ( 2 × 2 ) matrix [ A ] given as

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

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

The square of [ A ] is the following ( 2 × 2 ) matrix:

> `A^2` := evalm(A^2) : A^2 = matrix(`A^2`) ;

A^2 = matrix([[5, -6], [-6, 20]])

or

> `A^2` := multiply(A, A) : A^2 = matrix(`A^2`) ;

A^2 = matrix([[5, -6], [-6, 20]])

* * *

N.B. The above matrix [ A ] is a unique square root of matrix [ A ] ^ 2 since the latter is a positive definite matrix as verified by the Boolean value true returned by the function definite , viz.

> definite(`A^2`, 'positive_def') ;

true

[ For the function square root of a matrix, refer to Section B of Unit (23). ]

* * *

N.B. If a square matrix vanishes upon being raised to some positive power p , then the matrix is said to be nilpotent of index p . This implies that raising such a matrix to any integer power greater than the index p will also result in a zero matrix.

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

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

A = matrix([[1, 5, -2], [1, 2, -1], [3, 6, -3]])

and the index p = 3 .

The matrix [ A ] raised to this power yields the ( 3 × 3 ) zero matrix

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

A^3 = matrix([[0, 0, 0], [0, 0, 0], [0, 0, 0]])

or, the matrix [ A ] has vanished upon raising it to power 3 .

Notice that the determinant of a nilpotent matrix is zero :

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

Det(A) = 0

Notice that eigenvalues of a nilpotent matrix are all zero :

> charroots(A) := eigenvals(A) : char_roots(A) = charroots(A) ;

char_roots(A) = (0, 0, 0)

[ For eigenvalues of matrices, refer to Unit (21). ]

* * *

N.B. If a square matrix is unchanged under multiplication by itself, then the matrix is said to be idempotent . This implies that raising such a matrix to any integer power greater than 2 will also not change the matrix.

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

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

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

The square of [ A ] is the same matrix

> `A^2` := evalm(A^2) : A^2 = matrix(`A^2`) ;

A^2 = matrix([[2, -2, -4], [-1, 3, 4], [1, -2, -3]]...

Notice that the determinant of an idempotent matrix is zero :

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

Det(A) = 0

* * *

N.B. If a diagonal matrix is raised to some positive power p , then its elements are raised to the same power.

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

> A := diag(a[11], 0, a[33], a[44]) : A = matrix(A) ;

A = matrix([[a[11], 0, 0, 0], [0, 0, 0, 0], [0, 0, ...

and the power p = 5 .

The matrix [ A ] raised to this power yields the following diagonal matrix:

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

A^5 = matrix([[a[11]^5, 0, 0, 0], [0, 0, 0, 0], [0,...

* * *

N.B. The transpose of a square matrix raised to some (positive or negative) power p is equal to the transpose raised to this power

Transp( [ A ] ^ p ) = (Transp [ A ] )^ p

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

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

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

and the power p = 3 .

(a) The transpose of the matrix raised to this power, Transp( [ A ] ^ 3 ) , is the following ( 3 × 3 ) matrix:

> `transp(A^3)` := transpose(evalm(A^3)) : Transp(A^3) = matrix(`transp(A^3)`) ;

Transp(A^3) = matrix([[-4, 5, 5], [20, 66, 25], [5,...

(b) The transpose raised to this power, (Transp [ A ] )^ 3 , is the following ( 3 × 3 ) matrix:

> `(transp(A))^3` := evalm((transpose(A))^3) : [Transp(A)]^3 = matrix(`(transp(A))^3`) ;

[Transp(A)]^3 = matrix([[-4, 5, 5], [20, 66, 25], [...

Both resultant matrices are equal.

* * *

N.B. If two square matrices, [ A ] and [ B ], are commuting matrices, then and only then

( [ A ] + [ B ]) ^ 2 = [ A ] ^ 2 + 2 [ A ][ B ] + [ B ] ^ 2

otherwise

( [ A ] + [ B ]) ^ 2 = [ A ] ^ 2 + [ A ][ B ] + [ B ][ A ] + [ B ] ^ 2

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

> A := matrix(2, 2, [3, 4, 2, 3]) : B := matrix(2, 2, [3, -4, -2, 3]) : A = matrix(A) ; B = matrix(B) ;

A = matrix([[3, 4], [2, 3]])

B = matrix([[3, -4], [-2, 3]])

(a) The sum of the two matrices squared, ( [ A ] + [ B ] )^ 2 , is the following ( 2 × 2 ) scalar matrix:

> `(A+B)^2` := evalm((A+B)^2) : (A + B)^`2` = matrix(`(A+B)^2`) ;

(A+B)^`2` = matrix([[36, 0], [0, 36]])

(b) The sum [ A ] ^ 2 + 2 [ A ][ B ] + [ B ] ^ 2 is the following ( 2 × 2 ) scalar matrix:

> `A^2+2AB+B^2` := evalm(A^2 + 2*A &* B + B^2) : A^2+2*A*B+B^2 = matrix(`A^2+2AB+B^2`) ;

A^2+2*A*B+B^2 = matrix([[36, 0], [0, 36]])

The resultant matrices of (a) and (b) are equal.

* * *

N.B. In general, the integer power of the product of square matrices [ A ] and [ B ] of the same order is not equal to the product of either matrix raised to the same power

( [ A ] [ B ] )^n is not equal to [ A ] ^n [ B ] ^n

unless the matrices are commuting matrices ( for which [ A ] [ B ] = [ B ] [ A ] ) or diagonal matrices.

(1) Exemplarily, let the natural number n = 2 and ( 3 × 3 ) matrices [ A ] and [ B ] be given as

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

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

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

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

(a) The square of the product of both matrices, ( [ A ] [ B ] )^2 , is the following matrix:

> `(AB)^2` := evalm((A &* B)^2) : (A*B)^`2` = matrix(`(AB)^2`) ;

(A*B)^`2` = matrix([[41, 11, 26], [120, 108, -6], [...

(b) The product of either matrix raised to the same power, [ A ] ^2 [ B ] ^2 , is the following matrix:

> `A^2 B^2` := evalm(A^2 &* B^2) : A^2 * B^2 = matrix(`A^2 B^2`) ;

A^2*B^2 = matrix([[291, 47, -126], [-332, 52, 250],...

The resultant matrices of (a) and (b) are different.

(2) Let n = 2 and ( 2 × 2 ) commuting matrices [ A ] and [ B ] be the same that are used in Unit (4), i.e.

> A := matrix(2, 2, [6, 8, 4, 6]) : B := matrix(2, 2, [15, 20, 10, 15]) : A = matrix(A) ; B = matrix(B) ;

A = matrix([[6, 8], [4, 6]])

B = matrix([[15, 20], [10, 15]])

(a) The square of the product of both matrices, ( [ A ] [ B ] )^2 , is the following matrix:

> `(AB)^2` := evalm((A &* B)^2) : (A*B)^`2` = matrix(`(AB)^2`) ;

(A*B)^`2` = matrix([[57700, 81600], [40800, 57700]]...

(b) The product of either matrix raised to the same power, [ A ] ^2 [ B ] ^2 , is the following matrix:

> `A^2 B^2` := evalm(A^2 &* B^2) : A^2 * B^2 = matrix(`A^2 B^2`) ;

A^2*B^2 = matrix([[57700, 81600], [40800, 57700]])

The resultant matrices of (a) and (b) are equal.

(3) Let n = 2 and ( 3 × 3 ) diagonal matrices [ A ] and [ B ] be given as

> A := diag(3, -5, 7) : B := diag(-2, 4, 6) : A =matrix(A) ; B = matrix(B) ;

A = matrix([[3, 0, 0], [0, -5, 0], [0, 0, 7]])

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

(a) The square of the product of both matrices, ( [ A ] [ B ] )^2 , is the following matrix:

> `(AB)^2` := evalm((A &* B)^2) : (A*B)^`2` = matrix(`(AB)^2`) ;

(A*B)^`2` = matrix([[36, 0, 0], [0, 400, 0], [0, 0,...

(b) The product of either matrix raised to the same power, [ A ] ^2 [ B ] ^2 , is the following matrix:

> `A^2 B^2` := evalm(A^2 &* B^2) : A^2 * B^2 = matrix(`A^2 B^2`) ;

A^2*B^2 = matrix([[36, 0, 0], [0, 400, 0], [0, 0, 1...

The resultant matrices of (a) and (b) are equal.

* * *

N.B. The zero matrix raised to any positive integer power is the matrix unchanged.

As an example, consider the ( 2 × 2 ) matrix [ 0 ]

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

`0` = matrix([[0, 0], [0, 0]])

The square of matrix [ 0 ] is the following matrix:

> `0^2` := evalm(`0`^2) : `0`^2 = matrix(`0^2`) ;

`0`^2 = matrix([[0, 0], [0, 0]])

* * *

N.B. Literature sources use a convention that a square matrix raised to the power zero is equal to the appropriately sized unit matrix , i.e.

[ A ] ^ 0 = [ U ]

In Maple , the result of this exponentiation is the scalar value one .

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

> A := matrix(2, 2, [a[11], a[12], a[21], a[22]]) : A = matrix(A) ;

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

Raising matrix [ A ] to the power zero yields

> `A^0` := evalm(A^0) : A ^ `0` = `A^0` ;

A^`0` = 1

* * *

B. Negative-integer power of a matrix

The negative-integer power of a square matrix of order ( m × m ) or ( n × n ) is a matrix of the same order. The resultant is a product matrix that is obtained by multiple multiplication of the inverse of a given matrix. For example, the negative second power of a matrix [ A ] is defined by the relation

[ A ] ^( -2 ) = (Inv [ A ] )^ 2

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

> A := matrix(2, 2, [a[11], a[12], a[21], a[22]]) : A = matrix(A) ;

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

The negative second power of [ A ] may be obtained using either of the following alternative methods.

Method 1 . Using the evalm function:

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

A^` -2` = matrix([[a[22]^2/((-a[11]*a[22]+a[12]*a[2...

or, in a more compact form,

> `A^(-2)` := map(x->normal(x, expanded), `A^(-2)`) : A ^ ` -2` = matrix(`A^(-2)`) ;

A^` -2` = matrix([[(a[22]^2+a[12]*a[21])/(a[11]^2*a...

Method 2 . Using the evalm and inverse functions:

> `A^(-2)` := evalm((inverse(A))^2) : A ^ ` -2` = matrix(`A^(-2)`) ;

A^` -2` = matrix([[a[22]^2/((-a[11]*a[22]+a[12]*a[2...

or, in a compact form,

> `A^(-2)` := map(x->normal(x, expanded), `A^(-2)`) : A ^ ` -2` = matrix(`A^(-2)`) ;

A^` -2` = matrix([[(a[22]^2+a[12]*a[21])/(a[11]^2*a...

As a numerical example, compute the negative second power of a ( 2 × 2 ) matrix [ A ] given by

> A := matrix(2, 2, [-2, 4, 6, 1]) : A = matrix(A) ;

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

The negative second power of [ A ] is the following ( 2 × 2 ) matrix:

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

A^` -2` = matrix([[25/676, 1/169], [3/338, 7/169]])...

or

> `A^(-2)` := evalm((inverse(A))^2) : A ^ ` -2` = matrix(`A^(-2)`) ;

A^` -2` = matrix([[25/676, 1/169], [3/338, 7/169]])...

Floating-point evaluation of the negative second power of the matrix [ A ] gives the approximation

> `A^(-2)` := evalf(evalm(`A^(-2)`)) : A ^ ` -2` = matrix(`A^(-2)`) ;

A^` -2` = matrix([[.3698224852e-1, .5917159763e-2],...

* * *

N.B. The unit matrix raised to any (positive or negative) integer power is the matrix unchanged.

Exemplarily, compute the square and power -3 of the ( 2 × 2 ) unit matrix [ U ]

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

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

> `U^2` := evalm(U^2) : `U^(-3)` := evalm(U^(-3)) :

> U^2 = matrix(`U^2`) ; U ^ ` -3` = matrix(`U^(-3)`) ;

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

U^` -3` = matrix([[1, 0], [0, 1]])

* * *

Proceed to Unit (16) for " The complex matrix and its conjugate ".

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