Академический Документы
Профессиональный Документы
Культура Документы
Matrices 7.1
Introduction
When we wish to solve large systems of simultaneous linear equations, which arise for example
in the problem of nding the forces on members of a large framed structure, we can isolate
the coecients of the variables as a block of numbers called a matrix. There are many other
applications of a matrix. In this Block we develop the terminology and basic properties of a
matrix.
3x1 + 2x2 x3 = 3
x1 x2 + x3 = 4
2x1 + 3x2 + 4x3 = 5
We can isolate three facets of this system: the coecients of x1 , x2 , x3 ; the unknowns
x1 , x2 , x3 ; and the numbers on the right-hand sides.
Notice that in the system
3x + 2y z = 3
xy+z = 4
2x + 3y + 4z = 5
the only dierence from the rst system is the names given to the unknowns. It can be checked
that the rst system has the solution x1 = 2, x2 = 1, x3 = 1. The second system therefore
has the solution x = 2, y = 1, z = 1.
We can isolate the three facets of the rst system by using arrays of numbers and of unknowns:
3 2 1 x1 3
1 1 1 x2 = 4
2 3 4 x3 5
Even more conveniently we represent the arrays with letters (usually capital letters)
AX = B
a b
c d
Figure 1
The system can be represented by the matrix
a b c d
a 0 1 0 0
b 1 0 1 1
c 0 1 0 1
d 0 1 1 0
The row refers to the town from which the road starts and the column refers to the town where
it ends. An entry of 1 indicates that two towns are directly connected by a road (for example
b and d) and an entry of zero indicates that there is no direct road (for example a and c). Of
course if there is a road from b to d (say) it is also a road from d to b.
In this block we shall develop some basic ideas about matrices.
2. Definitions
An array of numbers rectangular in shape, is called a matrix. The rst matrix below has 3
rows and 2 columns and is said to be a 3 by 2 matrix (written 3 2)
1 4
2 3 1 2 3 4
5 6 7 9
2 1
Key Point
The General Matrix
A general m n matrix A has m rows and n columns.
The entries in the matrix are called the elements of A
In matrix A the element in row i and column j is denoted by aij
A matrix
with only
one column is called a column vector (or column matrix), for example,
x1 3
x2 and 4 are both 3 1 column vectors.
x3 5
A matrix with only one row is called a row vector (or row matrix). For example [2, 3, 8, 9] is
a 1 4 row vector (often the entries in a row vector are separated by commas for clarity).
Square matrices
When the number of rows is the same as the number of columns, i.e. m = n, the matrix is said
to be square and of order n (or m).
In an n n square matrix A, the leading diagonal (or principal diagonal) is the north-
west to south-east collection of elements a11 , a22 , . . . , ann . The sum of the elements in the
leading diagonal of A is called trace of the matrix, denoted by tr(A).
a11 a12 ... a1n
a a22 ... a2n
A = 21 .. tr(A) = a11 + a22 + . . . + ann
... ..
.
..
. .
an1 an2 ... ann
A square matrix in which all the elements below the leading diagonal are zero is called an
upper triangular matrix, often denoted by U .
u11 u12 ... u1n
0 u22 ... u2n
U =
0 .. .. uij = 0 when i > j
0 . .
0 0 0 unn
l 11 0 0 0
l 21 l 22 0 0
L=
... .. .. lij = 0 when i < j
. . 0
l n1 l n2 ... l nn
A square matrix where the only non-zero elements are along the leading diagonal is called
a diagonal matrix, often denoted by D.
d11 0 ... 0
0 d22 ... 0
D=
... .. .. .. dij = 0 when i = j
. . .
0 0 . . . dnn
1 2 3
Example A = is 2 3. It is not square.
4 5 6
1 2
B= is 2 2. It is square. Also tr(B) = 1 + 4 = 5.
3 4
1 2 3 4 0 3
Matrices C = 0 2 5 and E = 0 2 5 are 3 3, square and
0 0 1 0 0 1
upper triangular. Also tr(C) = 0 and tr(E) = 3.
1 0 0 1 0 0
Matrices F = 2 2 0 and G = 1 4 0 are 3 3, square and
3 5 1 0 1 1
lower triangular.
1 0 0 4 0 0
Matrices D = 0 2 0 and H = 0 2 0 are 3 3, square and
0 0 3 0 0 0
diagonal.
1 1 1 1 0 0 1 1 1 1 0 0
A= 1 1 1 B= 1 1 0 C= 0 1 1 D= 0 1 0
1 1 1 1 1 1 0 0 1 0 0 1
Answer
Equality of matrices
As we noted earlier, the terms in a matrix are called the elements of the matrix.
1 2
The elements of the matrix A = are 1, 2, 1, 4
1 4
We say two matrices A, B are equal to each other only if A and B have the same number of
rows and the same number of columns and if each element of A is equal to the corresponding
element of B. When this is the case we write A = B. For example if the following two matrices
are equal:
1 1 2
A= B=
1 1 4
then we can conclude that = 2 and = 4.
0 0 0 0 0
, .
0 0 0 0 0
Zero matrices, of whatever size, are denoted by 0.
The resulting matrix is called the transposed matrix of A and denoted AT . In the previous
example it is clear that AT is not equal to A since the matrices are of dierent sizes. If A is
square n n then AT will also be n n.
1 2 3 1 4 7
Example If B is 4 5 6 then B T is 2 5 8
7 8 9 3 6 9
Both matrices are 3 3 but B and B T are clearly dierent.
When the transpose of a matrix is equal to the original matrix i.e. AT = A, then we say that
the matrix A is symmetric.
In the previous example B is not symmetric.
1 2 3 1 2 3
Example If C = 2 4 5 then C T = 2 4 5 .
3 5 6 3 5 6
Clearly C T = C and C is a symmetric matrix. Notice how the leading diagonal
acts as a mirror; for example c12 = 2 and c21 = 2. In general cij = cji
for a symmetric matrix.
1 2 1 1 1 1 1 0
A= , B= C= D= 4 5 E=
3 4 1 1 1 0 0 1
7 8
Answer
1 2 5 6 9
A= and B=
3 4 7 8 10
There is no sensible way to dene A + B in this case since A and B are dierent sizes.
1+5 2+6 6 8
A+B = =
3+7 4+8 10 12
In general if A and B are both m n matrices, with elements aij and bij respectively, then their
sum is a matrix C, also m n, (written C = A + B) such that the elements of C are
cij = aij + bij i = 1, 2, . . . , m j = 1, 2, . . . , n
In the above example
c11 = a11 + b11 = 1 + 5 = 6 c21 = a21 + b21 = 3 + 7 = 10 and so on
Subtraction of matrices follows along similar lines:
15 26 4 4
D =AB = =
37 48 4 4
1 2 1 2 2 4
A+A= + =
3 4 3 4 6 8
What we see is that 2A (which is the shorthand notation for A + A) is obtained by multiplying
every element of A by 2.
In general if A is an m n matrix with typical element aij then the product of a number k with
A is written kA and has the corresponding elements kaij .
Hence, again using the matrix A above,
1 2 7 14
7A = 7 =
3 4 21 28
Similarly:
3 6
3A =
9 12
Now do this exercise
For the following matrices nd, where possible, A + B, A B, B A, 2A.
1 2 1 1
1. A = B=
3 4 1 1
1 2 3 1 1 1
2. A = 4 5 6 B = 1 1 1
7 8 9 1 1 1
1 2 3 1 2
3. A = 4 5 6 B= 3 4
7 8 9 5 6
Answer
Key Point
Properties of Matrices
Matrix addition is commutative: A + B = B + A.
Matrix addition is associative: A + (B + C) = (A + B) + C.
The distributive law holds: k(A + B) = k A + k B
These keypoint results follow by the fact that aij + bij = bij + aij etc.
We can also show that the transpose of a matrix satises the following simple properties:
(A + B)T = AT + B T
(A B)T = AT B T
(AT )T = A.
1 2 3
Example Show that (A ) = A for the matrix A =
T T
.
4 5 6
Solution
1 2
T T T 1 2 3
A = 2 5 so that (A ) = =A
4 5 6
3 6
1 2 1 1
For the matrices A = , B= verify that
3 4 1 1
(i) 3(A + B) = 3A + 3B (ii) (A B)T = AT B T .
Answer
2x1 + 3x2 x3 = 1
4x1 + 4x2 = 0
2x1 x2 x3 = 0
1 2 3
If B = 4 5 6 determine (3AT B)T .
0 0 1
1 4
1 2 3
2. If A = and B = 0 1 verify that 3(AT B) = (3A 3B T )T .
4 5 6
2 7
Answer
DERIVE can be used to perform matrix algebra. Let A and B be the matrices:
1 2 5 6
A= B=
3 4 7 8
To obtain the expression A + 2B using DERIVE we would rst key in the matrices using
Author:Matrix. Then, choosing the correct number of rows and columns, for A and then for B
imput the two matrices. DERIVE will respond
1 2
#1 :
3 4
5 6
#2 :
7 8
In order to carry out matrix algebra it is advisable to give these matrices names. To do this,
simply go into the Author:Expression menu screen and type A := #1 and then B := #2.
DERIVE will respond:
1 2
#3 : A :=
3 4
5 6
#4 : B :=
7 8
Now to obtain the expression A + 2B simply key in Author:Expression A + 2B =. DERIVE
will respond;
11 14
#5 : A + 2 B =
17 20
To obtain the trace of matrix A, say, simply key in TRACE(A)=. DERIVE will respond
TRACE(A)=5
Also the transpose of a matrix can be found. To nd the transpose of matrix A simply key in
A = where is the back-accent postxed operator. DERIVE will respond
1 3
#6 : A =
2 4
It would be a useful exercise to check all the matrix expressions in this block by using DERIVE.
T 1 3 T 1 1 T 1 1
A = , B = C = = C, symmetric
2 4 1 1 1 0
T 1 4 7 T 1 0
D = E = = E, symmetric
2 5 8 0 1
2 3 0 1 0 1 2 4
1. A + B = AB = BA= 2A =
4 5 2 3 2 3 6 8
2 3 4 0 1 2 0 1 2
2. A + B = 3 4 5 AB = 5 6 7 B A = 5 6 7
8 9 10 6 7 8 6 7 8
2 4 6
2A = 8 10 12
14 16 18
2 4 6
3. None of A + B, A B, B A, are dened. 2A = 8 10 12
14 16 18
2 1 6 3 3 6
(i) A + B = A = ; 3(A + B) = 3A =
2 5 6 15 9 12
3 3 6 3
3B = ; 3A + 3B =
3 3 6 15
0 3 0 4 1 3
(ii) A B = ; (A B) =
T
, T
A = ,
4 3 3 3 2 4
1 1 0 4
T
B = ; A B =
T T
1 1 3 3
1 0 2 3 6 9 3 0 6 6 6 3
T
B = , 3A 3B =
T
= .
4 1 7 12 15 18 12 3 21 0 12 3