Aa A Aa A Aa A: Chapter Two
Aa A Aa A Aa A: Chapter Two
Algebra - is a part of mathematics that deals with mathematical operations such as addition,
subtraction, multiplication and division.
Matrix: is A Rectangular Array of Real Numbers Arranged in m Rows and n Columns. Like
sets, it is symbolized by a bold face capital letter enclosed by brackets or parentheses as:
a11 a12 −−−−−− a1n
A = a 21 a 22 −−−−−− a 2 n In which, aij are real numbers.
a m1 a m2 −−−−−− a mn
Each number appearing in the array is said to be an element or component, of the matrix.
Elements of a matrix are designated using a lowercase form of the same letter used to
symbolize the matrix itself. These letters are subscript, as aij, to give the row and column
location of the element within the array. The first subscript always refers to the row location
of the element; the second subscript always refers to its column location. Thus, component
aij is the component located at the intersection of the ith row and the jth column.
The number of rows, m, and the number of columns, n, of the array give its order, or its
dimensions, mxn (read “m by n”) A= mxn or [aij] (mxn).
1 7
A = 5 3 This is a 3 x 2 matrix
4 2
ELEMENT
a12= 7
a21 = 5
a32 = 2
a23 = X - Because it is a 3 x 2 matrix.
1 5 9 15
2 6 10 20
B= This is a 4 x 4 matrix Elements b44 = 45, b32 = 7
3 7 11 30
4 8 12 45
1) Vector Matrix - is a matrix which consists of either one row or one column. That is, it
is an mx1 or a 1 x n matrix.
1.1. Row vector = is a 1 x n matrix
E.g. W = [-1, 0, 6]
1.2 Column Vector - is a mx1 matrix
2
5
E.g. B =
7
0
The transpose of an mxn matrix denoted A-t is an n x m matrix whose rows are the columns
in A (in the same order) and whose columns are the rows in A (in the same order).
1 4 7
1 2 3 10
2 5 8
If A = 4 5 6 11 then A-t = A =
3 6 9
7 8 9 12
10 11 12
Note that aijt = aij
2) Square Matrix - is a matrix that has the same number of rows and columns. It is also
called an nth order matrix.
2 2
E.g. 2x2, A = .
0 3
3) Null (Zero) Matrix - is a matrix that has zero for every entry. It is generally denoted
by Omn. In matrix operations it is used in much the same way that the number zero is
used in regular algebra.
0 0
A=
0 0
Thus, the sum of a zero matrix and any matrix gives that given matrix and the product of a
zero matrix and any matrix equals zero matrixes.
4) Identity Matrix - a square matrix in which all of the primary diagonal (∖) entries are
ones and all of the non-diagonal entries are zeros. Generally, it is denoted as In. Primary
diagonal represents: a11, a22, a33, a44, --- ann entries.
1 0 0 0
1 0 0
I2 = A = , I4 = A = 0 1 0
0 1 0 0 1 0
0 0 0 1
The product of any given matrix and the identity matrix is the given matrix itself. That is, A x
I = A and I.A = A. Thus, the identity matrix behaves in matrix multiplication like the number
1 in an ordinary arithmetic.
5) Scalar Matrix - is a square matrix where elements on the primary diagonal are the
same and the rest zeros.
5 0 0
3 0 0 5 0 0
A= B=
0 3 0 0 5 0
0 0 0 5
7) Equal Matrices -Two matrices A & B, are said to be equal only if they are of the
same dimensions and if each element in A is identical to its corresponding element in B;
that is, if and only if aij = bij for every pair of subscripts i and j. If A = B, then B = A; or
if A≠B, then B ≠A.
1 2 1 2
A= is equal to B = A =
3 4 3 4
1 2 4 2
However; A = is not equal to C =
3 4 3 1
Even though they contain the same set of numerical values, A and C are not equal because
their corresponding elements are not equal; that is, a11 ≠ C11 and so on.
1 3 7 9 8 12
eg + =
2 4 8 − 10 10 − 6
NB: Given that two matrices do have the same dimension, the way we subtract a matrix from
another matrix is the same as the way we add two matrices.
If A and B are two matrices, the product AB is defined if and only if the number of columns in
A is equal to the number of rows in B, i.e., if A is an m x n matrix, B should be an n x b. If this
requirement is met, A is said to be conformable to B for multiplication. The matrix resulting
from the multiplication has dimensions equivalent to the number of rows in A and the number of
columns in B.
Matrix by matrix multiplication indicates a row by column multiplication, where the entry in the
ith row and jth column of the product AB is obtained by multiplying the entries in the ith row of A
by the corresponding entries in the jth column of B and then adding the results. That is, to obtain
the entry in the ith row and jth column of the product AB, use the ith row of A and the jth column
of B in the following form:
Example
2 3 4 −1 7
A= B = 0 8
6 9 7
5 1
A.B = (2x-1) + (3x0) + (4x5) (2x7) + (3x8) + (4x1)
= 18 42
= (6x-1) + (9x0) + (7x5) (6x7) + (9x8) + (7x1)
= 29 121
18 42
AB =
29 121
40 60 45
BA = 48 72 56
16 24 27
1. The Associative and distributive laws of ordinary algebra apply to matrix multiplication. Given
three matrices A, B and C, which are conformable for multiplication?
▪ A (BC) = (AB) C -------------------- Associative law, not C (AB).
▪ A (B+C) = AB + AC -------------- Distributive law
2. The commutative law of multiplication does not apply to matrix multiplication. For any two real
numbers X and Y, the product XY is always identical to the product YX. But for two matrices A
and B, it is not generally true that AB equals BA. (In the product AB, we say that B is pre-
multiplied by A and that A is post-multiplied by B). In many instances for two matrices A and
B, the product AB may be defined while the product BA is not defined, or vice versa.
In some special cases, AB does equal BA. In such special cases A and B are said to Commute.
3. The product of two matrices can be the zero matrixes even though neither of the two matrices
themselves is zero matrix! We cannot conclude from the result AB = 0 that at least one of the
matrices A or B is a zero matrix.
3 0 0 0 0 0 0 0 0
A = 2 0 0 , B = 7 10 4 , AB =
0 0 0
1 0 0 8 3 2 0 0 0
If A is a square matrix of order n, then a square matrix of its inverse (A-1) of the same order n is
said to be the inverse of A, if and only if AA-1 = I = A-1A.
Two square matrices are inverse of each other if their product is the identity matrix: I = AA-1 =
A-1A.
Not all matrices have an inverse. In order for a matrix to have an inverse, the matrix must, first of
all, be a square matrix. Still not all square matrices have inverse. If a matrix has an inverse, it is
said to be inevitable or non-singular. A matrix that doesn’t have an inverse is said to be
singular. An inevitable matrix will have only one inverse; that is, if a matrix does have an
inverse and that inverse is unique.
Then, because AA-1 = I and A-1 I = A-1, we would have [I/A-1]. We do not follow this procedure,
because the inverse is not known at this juncture; we are trying to determine the inverse. We
instead employee a set of permissible row operations on the augmented matrix [A/I] to transform
A on the left side of the vertical line in to an identity matrix (I). As the identity matrix is formed
on the left of the vertical line, the inverse of A is formed on the right side. The allowable
manipulations are called elementary row operations. These Elementary Row Operations are
operations permitted on the row of a matrix.
4 3 2 8 6 4
2. A B = A = multiplying the first row by 2.
−2 6 7 −2 6 7
4 3 2 4 3 2
3. A B= = Multiplying the first row by 2 and add
−2 6 7 6 12 11
nd
to 2 row.
1 2 3 1 2
9 13
A= B = 1 1 C, =
13 19
2 4
3
2 3
Interchange R1 with R2
2 3 4 1 2
13 19
A= B = 1 1 C, =
9 13
1 3
2
2 3
Using matrix algebra any systems of linear equations can be expressed as, Ax = B where A is a
coefficient matrix, X is a variable matrix and B is the constant matrix or constant vector.
2 x + 6 y = − 10
x − 3y = 7
2 6 − 10
1 − 3 7
1 − 3 7
R1 R2 =
2 6 − 10
1 − 3 7
R2 − 2 R1 → R2 =
0 12 − 24
1 − 3 7
1/12 R2 R2 =
0 1 − 2
1 0 1
R1+3R2R1=
0 1 − 2
X + 0y = 1
0x + y = -2
Example 2: Solve the following linear equation system using Gauss Jordan method,
4x + 6y = 8
6x + 9y = 12
Solution: Apply elementary row operation to the augmented matrix of the system,
4 6 8
6 9 12
1 3 2
2
1/4R1 → R1 =
6 9 12
1 3 2
R2 – 6 R1 → R2 2
0 0 0
At this point we cannot continue the process since all entries in the last row are 0. The system of
equations corresponding to this final augmented matrix is,
X + 3/2y =2
0=0
Which means we really have a single equation, x + 3/2 y = 2. The graphs of the two original
equations coincide and there are unlimited or infinitely many solutions, if we let value of x = k,
4 − 2K
then using the equation x + 3/2y = 2 we get y =
3
K , 4− 2 K
3 is a solution for any real number K. Replacing value of K with a real number
produces a particular solution to the system? For instance, if K = -1 then one particular solution
is (- 1, 2)
2x+ 2y + 4y = 13
X – y + 3z = 8
3x + 3y + 6z = 20
Solution: Apply elementary row operations to the augmented matrix of the system
2 2 4 13
R1 R2 = 1 − 1 3 8
3 3 6 20
1 − 1 3 8
R2 - 2R1 → R2 = 2 2 4 13
3 3 6 20
R3 - 3R1 → R3
1 − 1 3 8
0 4 − 2 − 3
0 6 − 3 − 4
1 − 1 3 8
1
R 2 R2 = 0 1 − 1 − 3
4 2 4
0 6 − 3 − 4
5 29
1 0 2 4
-6R2 + R3 → R3 = 0 1 −
1 3
−
2 4
1
0 0 0
2
When we write the equation corresponding to the last row of this final augmented matrix, we get
a false statement 0 = 1/2. Hence, the system has no solution.
2x +3y = 1
3x - y = 7
2x –y = 5
Solution: Apply elementary row operations to the augmented matrix of the system
2 3 1
3 − 1 7
2 − 1 5
3 1
1 2 2
1
R1 → R1 = 3 −1 7
2 2 − 1 5
R2 -3R1 → R2 =
3 1
1 2 2
11 11
R3 -2R1 → R3 = 0 − 2 2
2 − 4 4
1 3 / 2 1/ 2
-2/11R2 → R2 = 0 1 −1
2 − 4 4
3
R1 – R2 → R1
2
1 0 2
R3 + 4R2 → R3 = 0 1 − 1
0 0 0
At this point we stop the process since there is no entry in the third row third column. In fact,
there is no third column. The linear system corresponding to this last augmented matrix is;
0x + y = -1
Example 5: Solve the following 2 by 3 system of linear equations Using Gauss Jordan
X + Y - 2Z =8
2X – Y + 2Z= 7
Solution: Apply elementary row operations to the augmented matrix of the system
1 1 − 2 8
2 − 1 7
2
1 1 − 2 8
R2 – 2R1 → R2 =
0 − 3 − 6 − 9
1 1 1 − 2 8
- R 2 R2 =
3 0 1 − 2 3
1 0 0 5
R1 – R2 → R1 = 0 1 − 2
3
At this point we stop the process. Why? The last matrix corresponds to the system
X =5 Y – 2z = 3
Thus, we have infinitely many solutions. Solving the first equation in terms of z we get y= 3+2z.
Let z = K. then for any real number K,
X = 5,
Y = 3 + 2k,
Z=k
The solution given by (5, 3+2k, K) is called a general solution. We can have particular solutions
for the system by assuming particular values for K. for instance, if K = 4, then
X= 5
Y = 3+2(4) =11
Z= 4
Remark: Note that a system of linear equations with more variables than equations can’t have a
unique solution. (i.e m<n)
Example x1 + 3x2 = 16
2x1 + 2x2 = 16
Solution;
Step 1: Put the equation in a matrix form
A= 1 3
2 2
Step 2: Find the inverse of the coefficient matrix.
A-1 = -½ ¾
½ -¼
Step 3: Multiply the inverse with right hand side values (vector of constants)
This inverse can be used to determine the solution to the system. Accordingly the solution is
given as follows:
-½ ¾ . 16 = x1
½ -¼ 16 x2
x1 = 4
x2 4
When the information becomes that 18 for the right hand side value for the first equation and 16
as it is for the second one, the solution can easily be determined by introducing tha new change
to the solution procedure as given below.
-½ ¾ . 18 = x1
½ -¼ 16 x2
x1 = 3
x2 = 5
1. M by n linear systems
The mxn linear systems are those systems where the number of rows (m) and number of
columns (n) are unequal or it is the case where the number of equations (m) and the number
of variables (n) are unequal. And it may appear as m>n or m<n.
To solve an m by n systems of equations with m>n, we start with the matrix (A/B), and attempt
to transform it in to the matrix (I/C). One of the three things will result:
1. An m by n identity matrix mxn bottom rows that are all zeros, giving the unique solution
2. A row that all zeros except in the constant column, indicating that there are no solutions.
3. A matrix in a form different from (1) and (2), indicating that there are an unlimited number
of solutions.
Our attempt transforms (A/B) in to (I/C) in the case where m<n will result in:
1. A row that is all zeros except in the constant column, indicating that there are no solutions.
Or
2. A matrix in a form different from (1), indicating that there are an unlimited number of
solutions.
“Every system of linear equations has either no solution, exactly one solution or infinitely many
solutions.”
Suppose two companies, company A and company B, are producing the same product. Because
of a promotion campaign, buyers are switching between the product produced by company A
and company B. Assume that 10% of those who buy company A’s product buy from company B
next time and 40% of those buying from company B buy from company A next time. What will
be the market share of each company after a given period of time?
a. Currently it is known that 80% of customers shop at store 1 and 20% shop at store 2. In
reviewing a past data suppose we find that out of all customers who shopped at store 1 in a
given week 90% remain loyal for the next week (store one again), 10% switch to store 2. Out
of all customers who shopped at store 2, in a given week 80% remain loyal for the next week
(store 2 again), 20% switch to store 1. What will be the proportion of customers shopping at
store 1 and 2?
A. In each of the next two weeks?
Solution
Let’s denote Store 1 by S1 and Store 2 by S2.
Since it is known that 80% of customers shop at store one and 20% shop at store two, the initial
state/ current state probability matrix (V1) for store one and two will be denoted and given by the
matrix: V1= (0.8 0.2)
To find the transition probability matrix (P) from the information you have, the following
structure shows how it is developed.
To next weekly shopping period
From one-week S1 S2
S1 0.9 0.1
S2 0.2 0.8
The transition matrix is a square matric such that each entry indicates the probability of the
system moving from a given state to another state. Therefore, the transition probability matrix
0.9 0.1
will be: 𝑃 = ( )
0.2 0.8
To find the next state of probability matrix (V3), you use the current state matrix multiplied by
the transition probability matrix (P) given by:
Vn=Vn-1 P, for n=2,3,4…...
Where P=is transition probability matrix
Vn=the nth state probability matrix
Vn-1=the (N-1) th state of probability matrix
A. What will be the proportion of customers shopping at store 1 and 2 in each of the next two
weeks? i.e V2 and V3
0.9 0.1
V2=V1P= (0.8 0.2) ( ) = 0.8(0.9) +0.2(0.2) 0.8(0.1) +0.2(0.8)
0.2 0.8
S1 S2
= (0.72+0.04 0.08+0.16) = (0.76 0.24)
This shows that in the second week 76% of the customers shop at store 1 and 24% of customers
shop ate store 2.