Mathematics Part 1 Lecturer Kristine Sevcenko
Matrices. Basic Operations of Matrix Algebra
Definition 1. A matrix (plural: matrices) is a rectangular table (array) of numbers (elements) in m rows and n
columns; its dimension (also size, shape, order) is said to be m n . (Note: the number of rows is always written first,
and the number of columns, second.)
a11 a12 a13 ...a1n Here aij denotes the element in the i-th row, j-th
column. (Notice that the first index always refers to
a a a ...a
Consider the matrix A 21 22 23 2 n rows, and the second to columns.) We can indicate the
......
dimension of the matrix : A mn .
am1 am 2 am 3 ...amn
Definition 2. The matrix with dimension m 1 is called a vector (a column vector); the matrix with dimensions
1 n is called a row vector.
Definition 3. If m = n, the matrix is called a square matrix.
Definition 4. As opposed to matrices and vectors, plain numbers are called scalars.
Definition 5. Two matrices are called equal if
(1) they have exactly the same shape (order) and
(2) all the elements in corresponding positions are equal, that is,
A = B if and only if aij bij i {1, 2,..., m}, j {1, 2,..., n} The symbol means all, every, any.
Definition 6. A zero matrix (sometimes called the null matrix), denoted by Omn , is a matrix in which all
elements are 0.
Definition 7. In a square matrix all elements aij where i j (that is, all from the top left corner to the bottom
right corner) form the main diagonal. The other diagonal (from top right to bottom left) is called the secondary
diagonal.
Definition 8. A square matrix is called a diagonal matrix if all its elements except for the main diagonal are zero.
Definition 9. A diagonal matrix where all elements on the main diagonal equal 1 is called the identity matrix (also
the unit matrix) I (sometimes denoted E).
For example,
3 0 0 0
1 0 0
0 1 0 0
is a diagonal matrix,
1 0
I2 and
I3 0 1 0 are identity matrices.
0 0 5 0 0 1
0 0 1
0 0 0 7
Matrix Algebra
1. Transposition of a matrix. If all the rows of a m n matrix A are switched with the corresponding column,
its transposed matrix or transpose AT is obtained; aij a ji and the transpose has dimension n m .
T
2. The product of a scalar s and the matrix A is matrix sA = B obtained by multiplying all elements of A
by s: bij s aij .
3. Addition and subtraction. If two or more matrices have the same dimension, then their sum is a matrix C =
A + B also of the same dimension, where the corresponding elements are added: cij aij bij . Similarly, the
difference is a matrix D = A – B and dij aij bij .
4. The product of two matrices: AB = X such that xi j ai1b1 j ai 2b2 j ai 3b3 j ... ainbnj . That is, the
elements of the i-th row from the first matrix and elements of the j-th column in the second matrix are multiplied
in corresponding pairs and then all the products are added.
Note that the number of elements in each row of A must equal the number of elements in each column of B, and
if the two matrices have dimensions A mn and Bnk , then the product is the matrix Xmk : that is, matrices can be
multiplied only if the number of columns in the first matrix equals the number of rows in the second matrix.
The numbers in the middle must be equal (n = n), and the outer numbers will be the dimensions m k of X :
m n n k.
1.1 Page 1
Mathematics Part 1 Lecturer Kristine Sevcenko
a11 a12 a13 b11 b12
E.g., for A a21 a22 and B b b ,
a23 21 22
a a33 b b
31 a32 31 32
to find the element in the 2nd row, 1st column,
we use 2nd row of A and 1st column of B:
x21 a21b11 a22b21 a23b31
5. The power of a matrix: similarly to number powers, for square matrices only A n = A A ...A .
n factors
Examples
2 4 6 1 x y
3 4
Consider the matrices A 3 1 , B 3 8 , C 3 1 , D
0 5 2 5 0 2 z 1 2 1
18 3 4 3 8 5
2 3 0
Then AT ; 3B 9 24 ; A B 0 9 , A B 6 7
4 1 5 6 15 2 10 2 0
A = C if and only if x 2, y 4, 2 z 1 5 z 3
2 3 4 2 2 (4) 4 (1) 14 12
The product AD 3 3 1 2 3 (4) 1 (1) 7 11
0 3 5 2 0 (4) 5 (1) 10 5
The square 3 4 3 4 3 3 4 2 3 (4) 4 (1) 1 8
D2
2 1 2 1 3 2 1 2 2 (4) 1 ( 1) 4 7
Note that some operations are not possible;
e.g. the sums A+D and A+AT are impossible because the matrices have different dimensions and the
product DA is impossible because the number of columns in D is not equal to the number of rows in A.
Properties of Matrix Algebra
The following properties of matrix algebra are true for all square matrices of the same order.
1. Multiplication by a scalar:
(i) (a b)A aA bA
(ii) a A B aA aB
2. Matrix addition:
(i) zero element: A + O = O + A = A.
(ii) commutative law: A B B A
(iii) associative law: A B C = A B C
3. Matrix multiplication:
(i) If O is the zero matrix, then AO = OA = O for all A.
(ii) identity law: AI = IA = A for all A.
(iii) in general, the commutative property does not hold for multiplication: AB BA .
(iv) associative law: AB C = A BC
(v) distributive law: A(B C) AB AC and (B C) A BA CA .
1.1 Page 2
Mathematics Part 1 Lecturer Kristine Sevcenko
Practice
Exercise 1.A
3 3 7
1. If A
3 4 6
, B , C , find (a) A+ B (b) A + B + C (c) B + C (d) C + B – A
5 2 2 1 4 2
3 5 11 17 4 3
2. If P 10 2 (b) P – Q (c) Q – P
6 , Q 2 8 8 , find (a) P + Q
2 1 7 3 4 11
x x2 y 4 x y y x
3. Find the scalars x and y if (a) (b)
3 1 3 y 1 y x x y
6 12 1
B 1
B 12 B
4. If B find: (a) 2B (b) 3 (c) 12 (d)
24 6
2 3 5 1 2 1
5. If A , B find: (a) A+ B (b) A – B (c) 2A+ B (d) 3A – B
1 6 4 1 2 3
6. Given the matrices M and/or N, find the matrix X:
1 2
(a) M and 3 X = M
1
3 6
2 1
(b) N and 4X = N
3 5
1 0 1 4
(c) M , N and M 2X = N
1 2 1 1
3 4 0 9 8
12 10 8 1
7. Transpose the matrices given: D 1 5 2 K P 6 5
7 0 5 3 65 2 42 6 1
1
8. Find, if possible, the products AB and BA: (a) A 2 1
, B 5 6 (b) A 2 0 3 , B 4
3 4
2
2 3 1 1 0 1 2
9. Multiply the matrices: (a) 1 2 1 0 1 0 (b)
1 1 0 3
1 0 2 9 1 1 4
3 2 5 1 1 2 5 2
10. Find the matrix products: (a) (b) 2 3 (c) 1 0 2
5 8 0 2 1 0 4 10 1 0 4 1 3
5 2 3 2
5 2 11 1 0 1 0 0 4 0 7
(d) 1 0 2 (e) 5 (f) 0 1 0 1 5 6
1 0 4 3 0 1
3 2 0 0 1 2 3 3
4 1 3
1.1 Page 3
Mathematics Part 1 Lecturer Kristine Sevcenko
Exercise 1.B
2 1 1 3 0 4
1. If K 0 5 , L 5 5 , M 11 5 , find
3 4 2 6 7 6
(a) 2K+3L; (b) 3K-L+2M.
2 5 4
2. Find G+GT if G 3 0 1 .
4 0
2
1
3 2
3. If A 2 1 , B 1 5 0 , 3
C 5 6 and D ,
3 4 3 2 4 7 8 5
7
find, if possible, (a) AB (b) BA (c) CA (d) CB
(e) AD (f) BAD (g) BCA.
If the product is not possible, explain why.
4.
1 2 0
(a) Find A2 if A 2 1
(b) find M3 if M 5 1 (c) find the square of C 2 1 1
3 2 2 4
0 3 0
5. Find constants a and b such that A2 aA bI given that
(a) 1 2 (b) 3 1
A A
1 2 2 2
6. If A 2 3 and B 1 2 , compute and compare (A+B)2 and A2+2AB+B2.
1 0 1 1
1 3 1 2 . x y
7. Find the matrix X given that AX=B where A and B Hint: Let X
2 1 5 3 z t
0 1
8. Given A find all possible matrices M such that MA = AM.
1 0
1.1 Page 4
Mathematics Part 1 Lecturer Kristine Sevcenko
ANSWERS
Exercise 1.A
9 1 6 8 3 4 0 0
1. (a) (b) (c) (d)
3 3 1 1 6 1 11 3
20 1 8 14 9 14 14 9 14 3. (a) x y 2
2. (a) 8 10 2 (b) 12 6 14 (c) 12 6 14
(b) x y 0
1 5 18 5 3 4 5 3 4
12 24 2 4 12 1 3 6
4. (a) (b) (c) 1
(d)
48 12 8 2 2 2 12 3
3 5 6 1 1 4 5 8 11 5 7 14
5. (a) (b) (c) (d)
2 8 7 0 4 1 3 14 11 2 16 9
12 3
3 6 12 14 0 2 3 1 7
6. (a) 3 9 6 6
5
(b) (c) 1
10 65
7. DT 4 5 0 K T PT
9 18 4 4 0 2 0 2 5 8 2 8 5 1
1 42
2 0 3 2
8. (a) AB impossible, BA 28 29 (b) AB 8 BA 8 0 12 9. (a) 3 5 3 (b) 1
4 0 6 19
10 17 3 2 4
15 7 1 6
10. (a) (b) 2 3 (c) 1 0 2 (d)
25 11 2 35 11 2 12 12 14
4 0 7
5 11
(e)
(f ) 1 5 6
4 3 2 3 3
Exercise 1.B
0 11 9 11 8
5 8 4
7 11 5 8 4 2 8 3. (a) (b) not possible (c) 28 19 (d) 13 37 24
9 23 16 38 25 17 51 32
1. (a) 15 5 (b) 17 10 2. 2 0 1
12 26 21 18 8 1 0
140 84
(e) not possible (f ) not possible (g)
208 171
(b), (e), (f) the number of columns of the first matrix does not equal the
number of columns of the second matrix.
3 4 2
7 0 23 9 3 97 59
4. (a) A 2
(b) M
2
,M (c) C 4 6 1
2
0 7 18 14 118 38 6 3 3
5. (a) a 3, b 4 (b) a 1, b 8
9 4 10 0
A B
2
6. A 2AB B
2 2
, not equal
0 1 2 0
2 1 a b
7. X 8. M for a, b
1 1 b a
1.1 Page 5