Maths Chapt 8
Maths Chapt 8
The usual notation system is to denote matrices by a capital letter in bold type, as for matrix A
above, and to enclose the elements of a matrix in a set of squared brackets, i.e. [ ]. Matrices may
also be specified with algebraic terms instead of numbers. Each entry is usually known as an
‘element’. The elements in each matrix must form a complete rectangle, without any blank
spaces. For example, if there are 5 rows and 3 columns there must be 3 elements in each row and
5 elements in each column. An element may be zero though.
The size of a matrix is called its ‘order’. The order is specified as:
For example, the matrix A above has 5 rows and 3 columns and so its order is 5 × 3. Matrices
with only one column or row are known as vectors. These are usually represented by lower case
letters, in bold. For example, row vectors with 1 × 5 specified as:
1
Types of Matrices
The difference of equal matrices gives null matrix.
[ ]
00 0
00 0
00 0
A matrix consists of a set of ones in the main diagonal & zeros in the remaining portion
is called identity matrix. i e.
[ ]
10 0
01 0
00 1
Rules for Matrix Addition: let A, B & C be m×n matrices & let 0 denotes the m×n null matrix.
a) (A+B)+C = A+(B+C)
b) A+B = B+A
c) A+0 = A
d) A+(-A) = 0
a b
Given matrix A= c d [ ] and B=
[ eg hf ]
A+ B=
[ ac ++eg b+d+ fh] A−B=
[ca−e
−g
b−f
d −h ]
2
12 30
Example: If A= 8 15 [ ] [
7 35
and B= 4 8 ] what is A + B and A – B?
[
12+7 30+35
Solution: A+ B= 8+ 4 15+ 8 ]
¿
[1912 6523]
A−B=
[12−7
8−4
30−35
15−8 ]
¿
[ 54 −57 ]
Example: Given,
Find A + B and
A–B
Solution
A−B=
[105 124 129 147 ]−[ 88 189 213 54]
A−B=
[10−8
5−8
12−18 9−21 14−5 ]
4−9 12−3 7−4
A−B=
[−32 −5
−6 −12 9 ]
9 3
Scalar multiplication
3
There are two forms of multiplication that can be performed on matrices. A matrix can be
multiplied by a specific value, such as a number (scalar multiplication) or by another matrix
(matrix multiplication). Scalar multiplication simply involves the multiplication of each element
in a matrix by the scalar value.
If each item is sold for Birr 4, derive a matrix for total sales revenue for this retailer for these two
shop units over this two-week period.
Solution: Total revenue is calculated by multiplying each element in matrix of sales quantities A
by the scalar value 4, the price that each unit is sold at. Thus total revenue can be represented (in
£) by the matrix.
Scalar division works in the same way as scalar multiplication, but with each element divided by
the relevant scalar value.
If A, B & C are matrices whose dimensions are such that the given operations are defined, then
4
But commutative law in matrix multiplication does not hold in general (matrix multiplication is
not commutative) i.e. AB≠BA.
[ ]
a b
If matrix A= c d and B= g h ,
e f
[ ]
AΧB=
[ ac ΧΧ e+e+bd ΧΧ gg ac ΧΧ ff +d+b ΧΧ hh]
Example: If A=[ ] and B=[
4 8]
2 3 7 5
, find A X B
8 1
Solution: A Χ B=[ ] [ 4 8]
2 3 7 5
Χ
8 1
AΧB=
[ 28 ΧΧ 7+3
7+1 Χ 4 8 Χ 5+ 1 Χ 8 ]
Χ 4 2 Χ 5+3 Χ 8
A Χ B=
[2660 3448]
You now may be wondering what happens if the number of elements along the rows of the first
matrix (or vector) does not equal the number of elements in the columns of the matrix that it is
multiplying. The answer to this question is that it is not possible to multiply two matrices if the
number of columns in the first matrix does not equal the number of rows in the second matrix.
Therefore, if a matrix A has order m × n and another matrix B has order r × s, then the
multiplication AB can only be performed if n = r, in which case the resulting matrix C = AB will
have order (m × s).
Now that the basic principles have been explained with some straightforward examples, we can
set out a general formula for matrix multiplication that can be applied to more complex matrix
multiplication exercises. The general m × n matrix with any number of rows m and columns n
can be written as:
For each element aij the subscript i denote the row number and the subscript j denotes the
column number. For example,
a11 = element in row 1, column 1
a12 = element in row 1, column 2
5
a1n = element in row 1, column n
amn = element in row m, column n
If this general m×n matrix A multiplies the general n×r matrix B then the product will be
the m × r matrix C. Thus we can write:
Where,
Solution: Using the general matrix multiplication formula, the elements of the first two rows of
the product matrix C can be calculated as:
c11 = 4 × 10 + 2 × 6 + 12 × 4 = 40 + 12 + 48 = 100
c12 = 4 × 0.5 + 2 × 3 + 12 × 4 = 2 + 6 + 48 = 56
c13 = 4 × 1 + 2 × 8 + 12 × 2 = 4 + 16 + 24 = 44
c14 = 4 × 7 + 2 × 2.5 + 12 × 0 = 28 + 5 + 0 = 33
c21 = 6 × 10 + 0 × 6 + 20 × 4 = 60 + 0 + 80 = 140
c22 = 6 × 0.5 + 0 × 3 + 20 × 4 = 3 + 0 + 80 = 83
c23 = 6 × 1 + 0 × 8 + 20 × 2 = 6 + 0 + 40 = 46
c24 = 6 × 7 + 0 × 2.5 + 20 × 0 = 42 + 0 + 0 = 42
6
Now try and calculate the elements of the final row for yourself. You should get the values
This identity matrix is the matrix equivalent to the number ‘1’ in standard mathematics. Any
matrix multiplied by the identity matrix will give the original matrix. For example,
Therefore, a matrix A can be inverted if there exists an inverse A−1 such that A−1A = I, the
identity matrix. Using this definition we can now see that if
As any matrix or vector multiplied by the identity matrix gives the same matrix or vector then,
7
There are several instances when the inverse of a matrix may not exist: Firstly, the zero, or null
matrix, which has all its elements equal to zero. There are zero matrices corresponding to each
possible order. For example, the 2 × 2 zero matrices will be;
Just as it is not possible to determine the inverse of zero in basic arithmetic, the inverse of
the zero matrices 0 cannot be calculated.
Secondly, linear dependence of two or more rows (or columns) of a matrix will prevent
its inverse being calculated. Linear dependency means that all the terms in one row (or
column) are the same scalar multiple of the corresponding elements in another row (or
column).
The reason for this will become obvious when we have worked through the method for
finding the inverse. Consider the two simultaneous equations;
These equations cannot be solved using simultaneous and matrix inverse. To actually find the
inverse of a matrix, we first need to consider some special concepts associated with square
matrices, namely:
The Determinant
Minors
Cofactors
The Adjoint Matrix
Determinants of Matrix
For a 2nd order matrix (i.e. order 2×2) the determinant is a number calculated by multiplying the
elements in opposite corners and subtracting. The usual notation for a determinant is a set of
vertical parallel lines either side of the array of elements, instead of the squared brackets used
for a matrix. The determinant of the general 2 × 2 matrix A, written as |A|, will therefore be:
8
If any sets of rows or columns of a matrix are linearly dependent then the determinant will be
zero and we have what is known as a singular matrix. For example, if the second row is twice
the value of the corresponding element in the first row and
The formula for the matrix inverse (which we will derive later) involves division by the
determinant.
Therefore, a condition for the inverse of a matrix to exist is that the matrix must be non-
singular, i.e. the determinant must not be zero. This condition applies to determinants of
any order.
This entails multiplying each of the elements in the first row by the determinant of the
matrix remaining when the corresponding row and column are deleted. For example, the
element a11 is multiplied by the determinant of the matrix remaining when row 1 and
column 1 are deleted from the original 3 × 3 matrix.
If we start from a11 then, as we use this method for each element across the row, the sign
of each term will be positive and negative alternately. Thus the second term has a
negative sign.
9
Solution: Expanding across the first row using the above formula, the determinant will be
Minors
The minor |Mij | of matrix A is the determinant of the matrix left when row i and column
j have been deleted. For example, if the first row and first column are deleted from
matrix:
Solution: The minor |M31| is the determinant of the matrix remaining when the 3rd row and 1st
column have been eliminated from matrix A. Therefore;
Cofactors
A cofactor is the same as a minor, except that its sign is determined by the row and
column that it corresponds to. The sign of cofactor |Cij | is equal to (−1)i+j . Thus if the
row number and column number sum to an odd number, the sign will be negative.
For example, to derive the cofactor |C12| for the general 3rd order matrix A we eliminate
the 1st row and the 2nd column and then, since i + j = 3, we multiply the determinant of
the elements that remain by (−1)3. Therefore;
10
Example: Find the cofactor |C22| of the matrix
Solution: The cofactor |C22| is the determinant of the matrix remaining when the 2nd row and 2nd
column have been eliminated. It will have the sign (−1)4 since i + j = 4. The solution is therefore;
Using the cofactor example above, we have already shown that for
11
Therefore the adjoint matrix will be AdjA = CT
Solution: We have already determined the adjoint for this particular matrix in the example
above. Its determinant |A| can be evaluated by expanding down the 3rd column as:
12
Self-test
Although small sets of linear equations can be solved by other algebraic techniques, e.g. row
operations, we will work through a simple example here to illustrate how the matrix method
works before explaining how larger sets of linear equations can be solved.
Recall, for a matrix A can be inverted if there exists an inverse A−1 such that A−1A = I, the
identity matrix. Using this definition we can now see that if
As any matrix or vector multiplied by the identity matrix gives the same matrix or vector then,
Example: Use matrix algebra to solve for the unknown variables x1, x2 and x3 given that
Solution: This set of simultaneous equations can be set up in matrix format as Ax = b where
13
To derive the vector of unknowns x using the matrix formulation x = A−1b we first have to derive
the matrix inverse A−1. The first step is to derive the cofactor matrix, which will be
The adjoint matrix will be the transpose of the cofactor matrix and so
You can check that these are the correct values by substituting them for the unknown variables
x1, x2 and x3 in the equations given in this problem. For example, substituting into the first
equation gives:
14
CRAMERS RULE
15
16
17