Matrices-Unit17.mws

MATRICES AND MATRIX OPERATIONS: Unit 17

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

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

(17) The orthogonal matrix

OBJECTIVES :

To define the orthogonal matrix.

To introduce the function orthog for testing matrices for orthogonality.

To provide examples of orthogonal matrices with numerical and symbolic elements.

To specify and illustrate properties of the orthogonal matrix.

To investigate properties of certain operations involving orthogonal matrices.

> restart : with(linalg, det, exponential, inverse, multiply, orthog, transpose) :

If the inverse of a real square matrix is equal to its transpose , then the matrix is said to be orthogonal . Thus, a matrix [ A ] is orthogonal if

Inv [ A ] = Transp [ A ]

The determinant of an orthogonal matrix is 1 or -1 .

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

> A := matrix(3, 3, [6/7, 2/7, 3/7, 3/7, -6/7, -2/7, 2/7, 3/7, -6/7]) : A = matrix(A) ;

A = matrix([[6/7, 2/7, 3/7], [3/7, -6/7, -2/7], [2/...

A Boolean value true returned by the orthog function verifies that the matrix is orthogonal, viz.

> orthog(A) ;

true

(a) The inverse of the matrix, Inv [ A ], is the following ( 3 × 3 ) matrix:

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

Inv(A) = matrix([[6/7, 3/7, 2/7], [2/7, -6/7, 3/7],...

(b) The transpose of the matrix, Transp [ A ], is the following ( 3 × 3 ) matrix:

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

Transp(A) = matrix([[6/7, 3/7, 2/7], [2/7, -6/7, 3/...

Both matrices of (a) and (b) are equal.

The determinant of [ A ] is

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

Det(A) = 1

As another example, consider a ( 2 × 2 ) matrix [ A ] given as

> A := matrix(2, 2, [cos(phi), sin(phi), -sin(phi), cos(phi)]) : A = matrix(A) ;

A = matrix([[cos(phi), sin(phi)], [-sin(phi), cos(p...

(a) The inverse of the matrix, Inv [ A ], is the following ( 2 × 2 ) matrix:

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

Inv(A) = matrix([[cos(phi)/(cos(phi)^2+sin(phi)^2),...

Simplification yields the following form of the above matrix:

> `inv(A)` := map(simplify, `inv(A)`) : Inv(A) = matrix(`inv(A)`) ;

Inv(A) = matrix([[cos(phi), -sin(phi)], [sin(phi), ...

(b) The transpose of the matrix, Transp [ A ], is the following ( 2 × 2 ) matrix:

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

Transp(A) = matrix([[cos(phi), -sin(phi)], [sin(phi...

Both matrices of (a) and (b) are equal, so matrix [ A ] is orthogonal. A test using the orthog function verifies this, viz.

> orthog(A) ;

true

Let, in the above matrix [ A ], phi = -3*Pi/2 to obtain a numerical example. Thus,

> A := subs(phi=-3*Pi/2, matrix(A)) : A = matrix(A) ;

A = matrix([[cos(-3/2*Pi), sin(-3/2*Pi)], [-sin(-3/...

Evaluation of [ A ] is performed using the function map and the arrow-type procedure including function eval , viz.

> A := map(x->eval(x), A) : A = matrix(A) ;

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

(a) The inverse of the matrix, Inv [ A ], is the following ( 2 × 2 ) matrix:

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

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

(b) The transpose of the matrix, Transp [ A ], is the following ( 2 × 2 ) matrix:

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

Transp(A) = matrix([[0, -1], [1, 0]])

Both matrices of (a) and (b) are equal.

The determinant of [ A ] is

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

Det(A) = 1

* * *

N.B. The product of the transpose of an orthogonal matrix and the matrix itself obeys the commutative law . The product matrix is the appropriately sized unit matrix

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

As an example, consider the above matrix [ A ] with numerical elements.

(a) The product (Transp [ A ] ) [ A ] is the following ( 2 × 2 ) matrix:

> `transp(A) A` := multiply(transpose(A), A) : Transp(A)*A = matrix(`transp(A) A`) ;

Transp(A)*A = matrix([[1, 0], [0, 1]])

(b) The product [ A ] (Transp [ A ] ) is the following ( 2 × 2 ) matrix:

> `A transp(A)` := multiply(A, transpose(A)) : A* `Transp(A)` = matrix(`A transp(A)`) ;

A*`Transp(A)` = matrix([[1, 0], [0, 1]])

Both product matrices are equal to the ( 2 × 2 ) unit matrix [ U ].

* * *

N.B. The unit matrix is an orthogonal matrix, i.e.

Inv [ U ] = Transp [ U ]

As an example, consider the ( 3 × 3 ) unit matrix [ U ]:

> U := array(1..3, 1..3, identity) : U = matrix(U) ;

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

(a) The inverse of the matrix, Inv [ U ], is

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

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

(b) The transpose of the matrix, Transp [ U ], is

> `transp(U)` := transpose(U) : Transp(U) = matrix(`transp(U)`) ;

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

Both matrices of (a) and (b) are equal, so matrix [ U ] is orthogonal. A test using the orthog function verifies this, viz.

> orthog(U) ;

true

* * *

N.B. The inverse of an orthogonal matrix is also an orthogonal matrix.

As a numerical example, consider the ( 2 × 2 ) orthogonal matrix [ A ] used earlier in this Unit, i.e.

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

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

Let the inverse of this matrix be named [ B ]:

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

B = matrix([[0, -1], [1, 0]])

(a) The inverse of the matrix, Inv [ B ], is

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

Inv(B) = matrix([[0, 1], [-1, 0]])

(b) The transpose of the matrix, Transp [ B ], is

> `transp(B)` := transpose(B) : Transp(B) = matrix(`transp(B)`) ;

Transp(B) = matrix([[0, 1], [-1, 0]])

Since Inv [ B ] = Transp [ B ], the matrix [ B ] is an orthogonal matrix. A test using the orthog function verifies this, viz.

> orthog(B) ;

true

* * *

N.B. The product of orthogonal matrices of the same order is also an orthogonal matrix. This requires that

{Transp( [ A ] [ B ] )} { [ A ] [ B ] } = [ U ]

Exemplarily, consider the two orthogonal matrices [ A ] and [ B ] used before, i.e.

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

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

B = matrix([[0, -1], [1, 0]])

(a) The transpose Transp( [ A ] [ B ] ) is the following ( 2 × 2 ) matrix:

> `transp(AB)` := transpose(multiply(A, B)) : Transp(A * B) = matrix(`transp(AB)`) ;

Transp(A*B) = matrix([[1, 0], [0, 1]])

(b) The product [ A ] [ B ] is the following ( 2 × 2 ) matrix:

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

A*B = matrix([[1, 0], [0, 1]])

(c) The product {Transp( [ A ] [ B ] )} { [ A ] [ B ] } is the following ( 2 × 2 ) unit matrix:

> `transp(AB) AB`:=multiply(`transp(AB)`, `AB`) : Transp(A*B) * A*B = matrix(`transp(AB) AB`) ;

Transp(A*B)*A*B = matrix([[1, 0], [0, 1]])

* * *

As an example of an orthogonal matrix whose determinant is -1 , consider the following ( 3 × 3 ) matrix [ A ]:

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

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

A test for orthogonality of [ A ] gives

> orthog(A) ;

true

The determinant of [ A ] is

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

Det(A) = -1

* * *

N.B. The exponential function of an antisymmetric matrix is an orthogonal matrix.

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

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

A = matrix([[0, -alpha], [alpha, 0]])

The exponential function of [ A ] yields the following matrix:

> `exp(A)` := exponential(A) : exp(A) = matrix(`exp(A)`) ;

exp(A) = matrix([[cos(alpha), -sin(alpha)], [sin(al...

A test for orthogonality of exp( [ A ] ) gives

> orthog(`exp(A)`) ;

true

[ For the exponential function of matrices, refer to Section A of Unit (23). ]

* * *

Proceed to Unit (18) for " Replacing a column in a matrix with a column matrix ".

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