MATRICES AND MATRIX OPERATIONS: Unit 10
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
-------------------------------------------------------------------
(10) The transpose of a matrix
OBJECTIVES :
• To define the transpose of a matrix and provide examples of transposition operation.
• To show the effect of transposition operation on specific types of matrices.
• To specify and illustrate general properties of transposition operation.
• To stress and show that transposition of a vector with Maple does not yield a column matrix .
• To introduce the function equal for testing if matrices are equal.
> restart : with(linalg, diag, equal, multiply, transpose) :
The
transpose
of a matrix ( or
transposed matrix
) is the matrix resulting from interchanging the rows and columns in the given matrix. If the given matrix is of order
(
×
)
, then its
transpose
is the matrix of order
(
×
)
.
Consider a
(
×
)
matrix [
A
] given as
> A := matrix(3, 2, [ a[11], a[12], a[21], a[22], a[31], a[32] ]) : A = matrix(A) ;
The transpose of the matrix [
A
] is the following
(
×
)
matrix:
> `transp(A)` := transpose(A) : Transp(A) = matrix(`transp(A)`) ;
This operation may be displayed in "like-in-a-book" form, viz.
> Transp(matrix(A)) = matrix(`transp(A)`) ;
* * *
N.B. The transpose of a diagonal matrix is the same as the matrix itself.
Exemplarily, the transpose of a
(
×
)
diagonal matrix [
B
] given as
> B := diag(3, 0, 2, 5) : B = matrix(B) ;
is the following
(
×
)
diagonal matrix:
> `transp(B)` := transpose(B) : Transp(B) = matrix(`transp(B)`) ;
This operation may be displayed in "like-in-a-book" form, viz.
> Transp(matrix(B)) = matrix(`transp(B)`) ;
* * *
N.B. Transposition of a square matrix does not change the determinant of the matrix.
[ For the determinant of a matrix, refer to Unit (11). ]
* * *
N.B. Transposition does not change the s ymmetric matrix.
Exemplarily, the transpose of a
(
×
)
symmetric matrix [
C
] given as
> C := matrix(3, 3, [1, a, a^2, a, a^2, 1, a^2, 1, a]) : C = matrix(C) ;
is the following
(
×
)
symmetric matrix:
> `transp(C)` := transpose(C) : Transp(C) = matrix(`transp(C)`) ;
This operation may be displayed in "like-in-a-book" form, viz.
> Transp(matrix(C)) = matrix(`transp(C)`) ;
* * *
N.B. Transposition changes sign of a skew-symmetric matrix but the matrix is otherwise unchanged.
Exemplarily, the transpose of a
(
×
)
skew-symmetric matrix [
E
] given as
> E := matrix(3, 3, [0, a, b, -a, 0, c, -b, -c, 0]) : E = matrix(E) ;
is the following
(
×
)
skew-symmetric matrix:
> `transp(E)` := transpose(E) : Transp(E) = matrix(`transp(E)`) ;
This operation may be displayed in "like-in-a-book" form, viz.
> Transp(matrix(E)) = matrix(`transp(E)`) ;
* * *
N.B.
According to the definition of the transpose of a matrix, the transpose of a
(
×
)
row matrix
is an
(
×
)
column matrix
, in which
.
Exemplarily, the transpose of a
(
×
)
row matrix [
RM
] given as
> RM := matrix(1, 3, [a, b, c]) : RM = matrix(RM) ;
is the following
(
×
)
column matrix:
> `transp(RM)` := transpose(RM) : Transp(RM) = matrix(`transp(RM)`) ;
This operation may be displayed in "like-in-a-book" form, viz.
> Transp(matrix(RM)) = matrix(`transp(RM)`) ;
* * *
N.B. In some textbooks, the following 'shortcut notation' is used in relation to a vector
to mean "convert vector
to a
column matrix
by transposition".
Let us analyse this operation in Maple .
If the vector
is assigned the name RV, viz.
> RV := array([a, b, c]) : RV = eval(RV) ;
then, transposition operation of [ RV ] yields
> `transp(RV)` := transpose(RV) : Transp(RV) = transpose(eval(RV)) ;
In executing this operation, Maple treats vector [ RV ] as if it were a column vector and, consequently, transposition of [ RV ] yields a row vector . This is evidenced by the following results.
(a) The product [
RV
]
(Transp
[
RV
]
),
which is a
(
×
)
symmetric
matrix:
> `RV transp(RV)` := evalm(RV &* `transp(RV)`) : RV * Transp(RV) = eval(`RV transp(RV)`) ;
This corresponds to the result of multiplication of a column matrix and a row matrix – refer to Section B of Unit (5).
(b) The product (Transp [ RV ] ) [ RV ] , which is a scalar (number):
> `(transp(RV)) RV` := evalm(`transp(RV)` &* RV) : `Transp(RV)` * RV = eval(`(transp(RV)) RV`) ;
This corresponds to the result of multiplication of a row matrix and a column matrix – refer to Section A of Unit (5).
Thus, transposition of a (row) vector does not yield a column matrix in Maple .
* * *
N.B.
According to the definition of the transpose of a matrix, the transpose of an
(
×
)
column matrix
is a
(
×
)
row matrix
.
Exemplarily, the transpose of a
(
×
)
column matrix [
CM
] given as
> CM := matrix(3, 1, [d, e, f]) : CM = matrix(CM) ;
is the following
(
×
)
row matrix:
> `transp(CM)` := transpose(CM) : Transp(CM) = matrix(`transp(CM)`) ;
This operation may be displayed in "like-in-a-book" form, viz.
> Transp(matrix(CM)) = matrix(`transp(CM)`) ;
* * *
N.B.
The transpose of the product of a matrix [
A
] and a scalar
equals the matrix transpose multiplied by the scalar
Transp( k [ A ] ) = k Transp [ A ]
Exemplarily, consider a
(
×
)
matrix [
A
] given as
> A := matrix(2, 3, [ a[11], a[12], a[13], a[21], a[22], a[23] ]) : A = matrix(A) ;
(a) The transpose of the product of the matrix [
A
] and scalar
,
Transp(
k
[
A
]
)
, is the following
(3 × 2)
matrix:
> `transp(kA)` := transpose(k*A) : Transp(k*A) = matrix(`transp(kA)`) ;
(b) The product of the matrix transpose multiplied by the scalar, k Transp [ A ], is the following (3 × 2) matrix:
> `k transp(A)` := evalm(k * transpose(A)) : k * Transp(A) = matrix(`k transp(A)`) ;
The equal function applied to the resultant matrices of (a) and (b), i.e.
> equal(`transp(kA)`, `k transp(A)`) ;
returns the
Boolean
value
, which verifies that both matrices are equal.
* * *
N.B. The product of the transpose of a square matrix [ A ] and the matrix is a symmetric matrix. The product of the same square matrix [ A ] and its transpose is also a symmetric matrix but both resultant matrices are different.
Exemplarily, consider a
(
×
)
matrix [
A
] given as
> A := matrix(2, 2, [a, b, c, d]) : A = matrix(A) ;
(a) The product
(Transp
[
A
]
)
[
A
] is the following
(
×
)
symmetric matrix:
> `(transp(A)) A` := evalm(transpose(A) &* A) : Transp(A) * A = matrix(`(transp(A)) A`) ;
(b) The product [
A
]
(Transp
[
A
]
)
is the following
(
×
)
symmetric matrix:
> `A transp(A)` := evalm(A &* transpose(A)) : A * `Transp(A)` = matrix(`A transp(A)`) ;
The matrices of (a) and (b) are symmetric but different.
* * *
N.B. The sum of a square matrix and its transpose is a symmetric matrix.
Exemplarily, consider a
(
×
)
matrix [
A
] given as
> A := matrix(2, 2, [a[11], a[12], a[21], a[22]]) : A = matrix(A) ;
The sum [
A
]
+ Transp
[
A
] is the following
(
×
)
symmetric matrix:
> `A+transp(A)` := evalm(A + transpose(A)) : A + Transp(A) = matrix(`A+transp(A)`) ;
This operation may be displayed in "like-in-a-book" form, viz.
> matrix(A) + Transp(matrix(A)) = matrix(`A+transp(A)`) ;
* * *
N.B. The difference of a square matrix and its transpose is a skew-symmetric matrix.
Exemplarily, consider a
(
×
)
matrix [
A
] given as
> A := matrix(2, 2, [a[11], a[12], a[21], a[22]]) : A = matrix(A) ;
The difference [
A
]
– Transp
[
A
] is the following
(
×
)
skew-symmetric matrix:
> `A-transp(A)` := evalm(A - transpose(A)) : A - Transp(A) = matrix(`A-transp(A)`) ;
This operation may be displayed in "like-in-a-book" form, viz.
> matrix(A) - Transp(matrix(A)) = matrix(`A-transp(A)`) ;
* * *
N.B. It follows immediately from the two preceding properties that any square matrix satisfies the formula
[
A
]
=
(
[
A
]
+
Transp
[
A
]
)
+
(
[
A
]
–
Transp
[
A
]
)
where
• term ½ ( [ A ] + Transp [ A ] ) is referred to as the symmetric part of square matrix [ A ],
• term ½ ( [ A ] – Transp [ A ] ) is referred to as the antisymmetric part of square matrix [ A ].
This formula implies that a square matrix can be expressed as the sum of symmetric and antisymmetric parts of the matrix. The following example supports and illustrates these names.
Consider a
(
×
)
matrix [
A
] given as
> A := matrix(3, 3, [a, b, c, d, e, f, g, h, i]) : A = matrix(A) ;
(a) Compute the symmetric part of [ A ] as ½ ( [ A ] + Transp [ A ] ) :
> sym(A) :=evalm(1/2*(A + transpose(A))) : Sym(A) = matrix(sym(A)) ;
(b) Compute the antisymmetric part of [ A ] as ½ ( [ A ] – Transp [ A ] ) :
> antisym(A) := evalm(1/2*(A - transpose(A))) : Antisym(A) = matrix(antisym(A)) ;
(c) The sum of the two parts of [ A ] yields the matrix
> `sym(A)+antisym(A)` := evalm(sym(A) + antisym(A)) :
> Sym(A) + Antisym(A) = matrix(`sym(A)+antisym(A)`) ;
which is the original square matrix [ A ].
* * *
N.B. Transposition is reflexive , i.e. the transpose of a matrix transpose is the matrix itself
Transp(Transp [ A ] ) = [ A ]
Exemplarily, consider a
(
×
)
matrix [
A
] given as
> A := matrix(3, 2, [ a[11], a[12], a[21], a[22], a[31], a[32] ]) : A = matrix(A) ;
The transpose of the transpose of the matrix,
Transp(Transp
[
A
]
)
, is the following
(
×
)
matrix:
> `transp(transp(A))` := transpose(transpose(A)) : Transp(Transp(A)) = matrix(`transp(transp(A))`) ;
This operation may be displayed in "like-in-a-book" form, viz.
> Transp(Transp(matrix(A))) = matrix(`transp(transp(A))`) ;
* * *
N.B. The transpose of the sum of two matrices is the sum of the two transposed matrices
Transp( [ A ] + [ B ] ) = Transp [ A ] + Transp [ B ]
Exemplarily, consider
(
×
)
matrices [
A
] and [
B
] given as
> A := matrix(2, 3, [a[11], a[12], a[13], a[21], a[22], a[23]]) :
> B := matrix(2, 3, [b[11], b[12], b[13], b[21], b[22], b[23]]) :
> A = matrix(A) ; B = matrix(B) ;
(a) The transpose of the sum of the two matrices,
Transp(
[
A
]
+
[
B
]
)
, is the following
(
×
)
matrix:
> `transp(A+B)` := transpose(evalm(A + B)) : Transp(A + B) = matrix(`transp(A+B)`) ;
(b) The sum of the two transposed matrices,
Transp
[
A
]
+ Transp
[
B
], is the following
(
×
)
matrix:
> `transp(A)+transp(B)` := evalm(transpose(A) + transpose(B)) :
> Transp(A) + Transp(B) = matrix(`transp(A)+transp(B)`) ;
This operation may be displayed in "like-in-a-book" form, viz.
> Transp(matrix(A) + matrix(B)) = matrix(`transp(A)+transp(B)`) ;
* * *
N.B. The transpose of the product of two matrices is the product of the two transposed matrices but in the reverse order
Transp( [ A ] [ B ] ) = Transp [ B ] Transp [ A ]
Exemplarily, consider a
(
×
)
matrix [
A
] and a
(
×
)
matrix [
B
] given as
> A := matrix(2, 3, [a[11], a[12], a[13], a[21], a[22], a[23]]) :
> B := matrix(3, 2, [b[11], b[12], b[21], b[22], b[31], b[32]]) :
> A = matrix(A) ; B = matrix(B) ;
(a) The transpose of the product of the two matrices,
Transp(
[
A
] [
B
]
)
, is the following
(
×
)
matrix:
> `transp(AB)` := transpose(multiply(A, B)) : Transp(A * B) = matrix(`transp(AB)`) ;
(b) The product of the two transposed matrices multiplied in the reverse order,
Transp
[
B
]
Transp
[
A
], is the following
(
×
)
matrix:
> `transp(B) transp(A)` := multiply(transpose(B), transpose(A)) :
> Transp(B) * Transp(A) = matrix(`transp(B) transp(A)`) ;
This operation may be displayed in "like-in-a-book" form, viz.
> Transp(matrix(A)*matrix(B)) = matrix(`transp(B) transp(A)`) ;
* * *
Proceed to Unit (11) for " The determinant of a matrix ".
-------------------------------------------------------------------