LECTURE ONE
MATRICES
INTRODUCTION
This lecture is divided into two subtopics.
In the first subtopic, the learner is introduced to the concept of matrices. Basic
definitions are given including the order of a matrix, equal matrices, row
matrix, column matrix e.t.c.
The second subtopic deals with operations on matrices. These include addition,
subtraction, scalar multiplication, dot product and matrix multiplication.
Each concept is illustrated by several examples. An activity in the form of an
exercise is given at the end of the lecture.
Answers to the self test questions in Section 1.6 have been provided at the end
of the module.
For further understanding, the learner is encouraged to read the books
recommended in Section 1.5
LECTURE OBJECTIVE
By the end of this lecture, the learner should be able to perform basic
operations on matrices
Including addition, subtraction, scalar multiplication and matrix
multiplication.
1.1 DEFINITIONS
Matrices are used as a shorthand for keeping essential data arranged in rows
and columns i.e matrices are used to summarize data in tabular form.
Definition: A matrix is an ordered rectangular array of numbers, usually
enclosed in parenthesis or square brackets. Capital letters are used to denote
matrices.
Order of a Matrix:
The size or order of a Matrix is specified by the number of rows and the
number of columns.
A general matrix of order m n is
1
, a11 a12 a1n
a a 22
A 21
a 22
aij ; i ith row, j jth column
a n1 an2 a mn
A Square Matrix is a one with the same number of rows and columns i.e
m m matrix. Two matrices are of the same size if they have the same order.
A vector is a matrix with one row (1 n) or one column (n 1). A row vector is
of the form 1 n, and a column vector is of the form m 1.
A zero matrix of order m n is the matrix with a ij 0 i 1, m, j 1 n .
Similarly, we talk of zero rows and column vector.
0
0
0 0,0, 0 or
0
Equal Matrices:
Two matrices A and B are said to be equal if they have the same order (size)
m n and aij bij i & j
1.2 OPERATIONS ON MATRICES
Addition and Subtraction of matrices
This is performed on matrices of the same order (size). Let A and B be m n
matrices.
A + B = aij bij aij bij cij m n
Scalar Multiplication
This is performed on any matrix and the resulting matrix is the same size
A aij aij . Each entry is multiplied by same number (scalar).
Dot product: let a and b be any two vector of size n (matrices with a single
column or row).
2
,
a = a1 , a2 , an , b b1 , b2 , bn . The dot product of a & b denoted a b , is given
by
n
a b a1b1 a2b2 anbn a i bi .The dot product is also scalar product.
i 1
Dot product of a row & column vector of order n.
b1
b n
a1 , a2 an 2 a1b1 a2b2 anbn aibi a b
i 1
n
b
Matrix Multiplication:
Let A a ik be an m n matrix, and B bkj an n s matrix. The matrix
product AB is the m s matrix C cij where cij the dot product of the ith row
of A and the jth column of B.
n
i.e. AB C , aik bkj = cij ; C ij Ai B j a ik bkj
k 1
Remark:
1.Let A m n , B s r be two matrices .
C AB exists iff n s & C is m n
C BA exists iff r m & C is s n
2. It’s possible for AB to be defined while BA is not defined. i.e. matrix
multiplication is not commutative.
Examples
1 2 3 3 0 2
1. Let A and B . Then
4 5 6 7 1 8
1 3 2 0 3 2 4 2 5
A B
4 7 5 1 6 8 3 6 2
3 1 3 2 33 3 6 9
2. 3A
3 4 35 3 6 12 15 18
2 4 6 9 0 6 7 4 0
3. 2 A 3B
8 10 12 21 3 24 29 7 36
3
, 1 2 1 1 1 1 2 0 1 1 2 2 1 5
4.
3 4 0 2 3 1 4 0 3 1 4 2 3 11
1 1 1 2 11 1 3 1 2 1 4 4 6
0 2 3 4 0 1 2 3 0 2 2 4 6 8
The above example shows that matrix multiplication is not commutative, i.e.the
products AB and BA of matrices need not be equal.
1.3 SUMMARY.
In this lecture we have defined a matrix, the order of a matrix, equal matrices,
row matrix, column matrix and square matrix
We have also learnt how to perform addition, subtraction, scalar multiplication,
dot product and multiplication of matrices.
1.4 EXERCISE 1
2 5 1 1 2 3 0 1 2
1. Let A , B , C .Find 3 A 4 B 2C .
3 0 4 0 1 5 1 1 1
x y x 6 4 x y
2. Find x, y, z and w if 3
z w 1 2w z w 3
1 2 3 1
3. Find AB and BA if (a) A = B=
5 4 4 6
5 5 2 1 4
(b) A B
4 1 3 1 2
4
MATRICES
INTRODUCTION
This lecture is divided into two subtopics.
In the first subtopic, the learner is introduced to the concept of matrices. Basic
definitions are given including the order of a matrix, equal matrices, row
matrix, column matrix e.t.c.
The second subtopic deals with operations on matrices. These include addition,
subtraction, scalar multiplication, dot product and matrix multiplication.
Each concept is illustrated by several examples. An activity in the form of an
exercise is given at the end of the lecture.
Answers to the self test questions in Section 1.6 have been provided at the end
of the module.
For further understanding, the learner is encouraged to read the books
recommended in Section 1.5
LECTURE OBJECTIVE
By the end of this lecture, the learner should be able to perform basic
operations on matrices
Including addition, subtraction, scalar multiplication and matrix
multiplication.
1.1 DEFINITIONS
Matrices are used as a shorthand for keeping essential data arranged in rows
and columns i.e matrices are used to summarize data in tabular form.
Definition: A matrix is an ordered rectangular array of numbers, usually
enclosed in parenthesis or square brackets. Capital letters are used to denote
matrices.
Order of a Matrix:
The size or order of a Matrix is specified by the number of rows and the
number of columns.
A general matrix of order m n is
1
, a11 a12 a1n
a a 22
A 21
a 22
aij ; i ith row, j jth column
a n1 an2 a mn
A Square Matrix is a one with the same number of rows and columns i.e
m m matrix. Two matrices are of the same size if they have the same order.
A vector is a matrix with one row (1 n) or one column (n 1). A row vector is
of the form 1 n, and a column vector is of the form m 1.
A zero matrix of order m n is the matrix with a ij 0 i 1, m, j 1 n .
Similarly, we talk of zero rows and column vector.
0
0
0 0,0, 0 or
0
Equal Matrices:
Two matrices A and B are said to be equal if they have the same order (size)
m n and aij bij i & j
1.2 OPERATIONS ON MATRICES
Addition and Subtraction of matrices
This is performed on matrices of the same order (size). Let A and B be m n
matrices.
A + B = aij bij aij bij cij m n
Scalar Multiplication
This is performed on any matrix and the resulting matrix is the same size
A aij aij . Each entry is multiplied by same number (scalar).
Dot product: let a and b be any two vector of size n (matrices with a single
column or row).
2
,
a = a1 , a2 , an , b b1 , b2 , bn . The dot product of a & b denoted a b , is given
by
n
a b a1b1 a2b2 anbn a i bi .The dot product is also scalar product.
i 1
Dot product of a row & column vector of order n.
b1
b n
a1 , a2 an 2 a1b1 a2b2 anbn aibi a b
i 1
n
b
Matrix Multiplication:
Let A a ik be an m n matrix, and B bkj an n s matrix. The matrix
product AB is the m s matrix C cij where cij the dot product of the ith row
of A and the jth column of B.
n
i.e. AB C , aik bkj = cij ; C ij Ai B j a ik bkj
k 1
Remark:
1.Let A m n , B s r be two matrices .
C AB exists iff n s & C is m n
C BA exists iff r m & C is s n
2. It’s possible for AB to be defined while BA is not defined. i.e. matrix
multiplication is not commutative.
Examples
1 2 3 3 0 2
1. Let A and B . Then
4 5 6 7 1 8
1 3 2 0 3 2 4 2 5
A B
4 7 5 1 6 8 3 6 2
3 1 3 2 33 3 6 9
2. 3A
3 4 35 3 6 12 15 18
2 4 6 9 0 6 7 4 0
3. 2 A 3B
8 10 12 21 3 24 29 7 36
3
, 1 2 1 1 1 1 2 0 1 1 2 2 1 5
4.
3 4 0 2 3 1 4 0 3 1 4 2 3 11
1 1 1 2 11 1 3 1 2 1 4 4 6
0 2 3 4 0 1 2 3 0 2 2 4 6 8
The above example shows that matrix multiplication is not commutative, i.e.the
products AB and BA of matrices need not be equal.
1.3 SUMMARY.
In this lecture we have defined a matrix, the order of a matrix, equal matrices,
row matrix, column matrix and square matrix
We have also learnt how to perform addition, subtraction, scalar multiplication,
dot product and multiplication of matrices.
1.4 EXERCISE 1
2 5 1 1 2 3 0 1 2
1. Let A , B , C .Find 3 A 4 B 2C .
3 0 4 0 1 5 1 1 1
x y x 6 4 x y
2. Find x, y, z and w if 3
z w 1 2w z w 3
1 2 3 1
3. Find AB and BA if (a) A = B=
5 4 4 6
5 5 2 1 4
(b) A B
4 1 3 1 2
4