You are on page 1of 9

General Mathematics VU

Matrices and Determinants Topic 3

• Definition: A matrix is a rectangular arrangement of numbers in rows and columns. The


order of a matrix is the number of the rows and columns. The entries are the numbers in the
matrix.

• Notation: A matrix A is written as follows:


a11 a12 ... a1n �


a a ... a2 n �
A = �21 22 �= ( a )
ij

... ... ... ........ �
� �
am1 am 2 ... amn �

where ars represents the entry in the rth row and sth column. A matrix with m rows and n
columns is said to have order m x n.

• Operations on Matrices:

o Addition of Matrices: To add two matrices, they must have the same order. To add,
we simply add corresponding entries.
o Example:
�5 -3� � -2 1 � �5 + (-2) -3 + 1 � �3 -2 �
� � � � �
-3 4 �+ �3 0 �= �-3 + 3 4+0 � � 4�
� �= �0 �

�0 7 ��� �4 -3� �0 + 4
� � 7 + (-3) �
� ��4 4� �

o Subtraction of Matrices: To subtract two matrices, they must have the same order.
We simply subtract corresponding entries.
o Example:
 9 -2 4  4 0 7   9-4 -2-0 4-7 
5 0 6 - 1 5 - 4 =  5 - 1 0-5 6 - (-4)
  
 1 3 8  - 2 3 2  1 - ( -2) 3-3 8 - 2 
 5 -2 - 3
=  4 - 5 10 
 3 0 6 

o Multiplication by a Scalar: In matrix algebra, a real number is often called a scalar.


To multiply a matrix by a scalar, we multiply each entry in the matrix by that scalar.
o Example:
- 2 0  4( -2) 4(0)  � -8 0 �
4  =  =�
4 - 1   4(4) 4(-1)  �16 -4 �

© Copyright Virtual University of Pakistan 1


General Mathematics VU

o Matrix Multiplication: Given an r x c matrix A and an s x d matrix B, we can


multiply A with B to form the matrix AB if c = s. The resulting matrix will have
dimension r x d.
To multiply two matrices, we multiply each row in the first matrix by each column in
the second matrix. An example is shown below:
a a �
� b11 b12 b13 �

A = �11 12 � B=�
a21 a22 �
� b21 b22 b23 �
� �
, ,
We can multiply to form the matrix C = AB since the number of columns of A is
equal to the number of rows of B. The multiplication is carried out as follows:

a11b11 + a12b21 a11b12 + a12 b22 a11b13 + a12b23 �



C = AB = �
a21b11 + a22b21 a21b12 + a22b22 a21b13 + a22b23 �
� �

o Example:
2 3�

� 111�

11�
A= � and B = �
� 1 0 2�
� �
� �
1 0�

(2)(1) + (3)(1) = 5 (2)(1) + (3)(0) = 2 (2)(1) + (3)(2) = 8� �
� 5 2 8�
� � � �
C = AB = �
(1)(1) + (1)(1) = 2 (1)(1) + (1)(0) = 1 (1)(1) + (1)(2) = 3 �= �2 1 3�
(1)(1) + (0)(1) = 1 (1)(1) + (0)(0) = 1 (1)(1) + (0)(2) = 1 �
� �� �
1 1 1��

• Definition: A Square matrix with ones on the diagonal and zeros elsewhere is called an
identity matrix. It is denoted by I.

• Example: The 4 x 4 identity matrix is:


1 0
� 0 0�

0 1 0 0�
I =� �

0 0 1 0�
� �
0 0
� 0 1�

• Definition: Given a square matrix B, if there exists a matrix D such that BD = DB = I, then D
is called the inverse of B, and is denoted by D = B-1.

n
• Given a system of equations �a x = b
j =1
ij j i , it can be written as a matrix equation Ax = b ,

where A is the matrix of the coefficients, is the column matrix of the variables and is the
column matrix of the constants. i.e.

© Copyright Virtual University of Pakistan 2


General Mathematics VU

a11 a12 ... a1n �




a21 a22 ... a2 n �
A= � �

... ... ... ........ � ,
� �
am1 am 2 ... amn �

If A-1 exists then the system has a unique solution given by x = A-1 b

• Definition: A matrix is in echelon form if it has the following properties


o Every non-zero row begins with a 1 (called a leading 1)
o Every leading one in a lower row is further to the right of the leading one above it.
o If there are zero rows, they are at the end of the matrix

A matrix is in reduced echelon form if in addition to the above three properties it also has
the following property:
o Every other entry in a column containing a leading one is zero

• Methods for finding Solutions of Equations:


o Using Row Operations: Recall that when we are solving simultaneous equations, the
system of equations remains unchanged if we perform the following operations:

 Multiply an equation by a non-zero constant


 Add a multiple of one equation to another equation
 Interchange two equations.

We have seen that any system of equations can be written as a matrix system. i.e. the
two systems are equivalent.
So, given a system Ax = b we can form the augmented matrix (Ab) by attaching an
additional column at the end of the matrix A with entries from matrix b. Since the
original system of equations remains unchanged as described above, the system
described by the augmented matrix (Ab) also remains unchanged under the following
row operations:

 Multiply a row by a non-zero constant


 Add a multiple of one row to another row
 Interchange two rows.

Using row operations, we will change the matrix (Ab) to an Echelon form or a
reduced Echelon form. Once that is achieved, the solution will be easily found.

Example: Solve the following system of equations:


x + 2y + z =1
2x + 2 y = 2
3x + 5 y + 4 z = 1

© Copyright Virtual University of Pakistan 3


General Mathematics VU

Solution: The system can be written in matrix form as:


1 2 1 ���
� x 1
��
� ���
2 2 0 ��� ��
y = ��
2


3 5 4�
� ���
z
�� ��
1
��

The augmented matrix is

�1 2 1 1 �R - 2 R 1 2 1 1 �R �
� 1 2 1 1�

( Ab) = �2 2 0 2�
2 1
� �
0 -2 -2 0 �~ �
23
� -1 1 -2 �
~
�R -3 R � 0 �

�3 5 4 1 �

3 1
0 -1 1 -2 �

� � � 0
� -2 -2 0 �

- R2
1 2 1 1 �R - 2 R �
� 1 0 3 -3�- R /4 �
1 0 3 -3�
� �1 2
� � 3
� -1 2 �
~ �0 1 -1 2 �R3~+2 R2 �0 1 -1 2 �~ � 0 1 �
0 -2 -2 0 �

� � �
�0 0 -4 4 �
� �
0 0
� 1 -1��
R1 - 3 R3
1 0 0 0�


0 1 0 1�
~
R2 + R3
� �

0
� 0 1 -1�

This gives the solution: x = 0, y = 1, z = -1

o Solving Equations using Inverse: If we could find A-1, we could also solve the system
-1
by using x = A b. One way to find inverse is as follows:

o Theorem: Given a nxn matrix A, if the augmented matrix (AI), where I is the nxn
identity matrix, can be row reduced to a matrix (IB), then B is the inverse of A. If (AI)
cannot be reduced to (IB), then A does not have an inverse.

o Example: Solve the system of equations:


2x - 2 y + 2z = 1
2y - z =1
2 x + 3 y = -1

Solution: The matrix A of the coefficients is


2 -2 2 �


0 2 -1�
� �

2
� 3 0 �

© Copyright Virtual University of Pakistan 4


General Mathematics VU

To find A-1 we use the above theorem


2 -2 2 1 0 0 �R - R �
� 2 -2 2 1 0 0�
( AI ) = � �
0 2 -1 0 1 0 �~ � � 3 1
� 0 2 -1 0 1 0�


2 3 0 0 0 1�
� � � � 0 5 -2 -1 0 1�

� 1 0 0� � 1 0 0�
R1 /2 �
1 -1 1 2 1 -1 1 2
�R2 - 2 R3 � �
~
R23 �
� 0 5 -2 -1 0 1 � ~ �

0 1 0 -1 -2

1�

� 0 2 -1 0 1 0 � 0 2 -1 0
� 1 0�
� � � �
� -1 -2 1 � � 3 -1�
1 0 1 2 1 0 0 2 3
R1 + R2 � �R1 + R3 � �
~ �0 1 0 -1 -2 1 �
R3 - 2 R2 �
~ �0 1 0 -1 -2
�- R3 �
1�

0 0 -1 2
� 5 -2� � 0 0 1 -2 -5 2�
� � � �

So, 3
� 3 -1�
�2 �
A-1 = �-1 -2 1 �
� �
�-2 -5 2 �
� �
This gives the solution

�3 3 -1� �3 + 3 + 1� � 11 �
�x � � 2 �
� 1 � � 2 � � 2�
� � -1 � �� �
x = �y �= A b = -1 -2 1 �1 �= -1 - 2 - 1 = -4 �
� � �
�z � � �
� � �� �
�� �-2 -5 2 �
�-1��� -2 - 5 - 2 � �-9 �
� � � �� �
• Definition: Let M be the set of all square matrices. Then the Determinant is a function from M to
the set of real numbers. i.e. the determinant is a process of attaching a real number to every
square matrix.

• Notation: If A is a square matrix, then determinant of A is denoted by detA or |A|

• Example: det =

• Second Order Determinant: A 2 x 2 determinant can be found using the following method:

a11 a12
= a11a22 - a21a22
a21 a22

-1 2
• Example: = (-1)(-4) - (-3)(2) = 4 + 6 = 10
-3 -4

© Copyright Virtual University of Pakistan 5


General Mathematics VU

Definition: The Minor of an element in a third-order determinant is a second-order determinant



obtained by deleting the row and column that contains the element.

a11 a12 a13


Example: Given a21 a22 a23

a31 a32 a33

a11 a12
The Minor of a23 =
a31 a32

a11 a13
The Minor of a32 =
a21 a23
i+ j
Definition: The Cofactor of aij = (-1) (Minor of a )
• ij

The cofactor of a is denoted by C


• ij ij

Thus, the cofactor of an element is nothing more than a signed minor.


a11 a12 a13


Example: Given a a22 a23
• 21

a31 a32 a33

2+3
a11 a12 a11 a12
The Cofactor of a23 = C23 = (-1) =-
a31 a32 a31 a32

1+1
a22 a23 a a23
The Cofactor of a11 = C11 = (-1) = 22
a32 a33 a32 a33

Theorem: The value of a determinant of order 3 is the sum of three products obtained by

multiplying each element of any one row (or each element of any one column) by its cofactors.

Note: The above theorem and definitions of minor and cofactor generalize completely for

determinants of order higher than 3

2 -2 0
Example: Evaluate -3 1 2

1 -3 -1

© Copyright Virtual University of Pakistan 6


General Mathematics VU

Solution: We expand by the first row to get:

2 -2 0
-3 1 2 =
1 -3 -1
� 1+1 1 2 � � 1+ 2 -3 2 � � 1+1 -3 1 �
2� (-1) �+ (-2) � (-1) �+ (0) � (-1) �=
� -3 -1 � � 1 -1 � � 1 -3 �
(2)(1)[(1)(-1) - (-3)(2)] + (-2)(-1)[(-3)(-1) - (1)(2)] + 0 =
(2)(5) + (2)(1) = 12

Finding Inverse Using Determinants


Definition: Given a matrix A, the transpose of A denoted AT is the matrix obtained by



interchanging the rows of A with its columns.

�8 -1 3 � �8 0 10 �
Example: The transpose of A = �0 0 2� A =�
�is T
-1 0 4�
• � � �

10
� 4 -3�� �
�3 2 -3 �

Definition: Given a matrix A, calculate all the cofactors of A. We then form the matrix (C ) of
ij

the cofactors. The Adjoint or Adjugate of A is the transpose of the matrix of the cofactors. i.e.
adj ( A) = (Cij )T = (C ji )
The inverse of A is then found by the formula: A-1 = 1 adj ( A)
• | A|
Example: Find the inverse of the following matrix using determinant.

�-2 1 3�
A= �0 -1 1 �



�1 2 0 �

Solution: We need to first find all the cofactors.
-1 1 0 1 0 -1
C11 = ( -1)1+1 = -2 C12 = ( -1)1+ 2 =1 C13 = (-1)1+3 =1
2 0 1 0 1 2

1 3 -2 3 -2 1
C21 = (-1) 2+1 =6 C22 = (-1) 2+ 2 = -3 C23 = (-1) 2+3 =5
2 0 1 0 1 2

1 3 -2 3 -2 1
C31 = ( -1)3+1 =4 C32 = (-1)3+ 2 =2 C33 = (-1)3+3 =2
-1 1 0 1 0 -1

© Copyright Virtual University of Pakistan 7


General Mathematics VU

T
�C11 C12 C13 � � C11 C21 C31 � � -2 6 4�

Now, adj ( A) = C21 C22 � �
C23 � = �
C12 C22 � �
C32 �= �1 -3 2�
� �. And

�C31 C32 C33 �
� � C13
� C23 C33 �
� ��1 5 2�

-2 1 3
-1 1 0 1 0 -1
det( A) = 0 -1 1 = -2 -1 +3 = -2(-2) - 1(-1) + 3(1) = 8
2 0 1 0 1 2
1 2 0

�-2 6 4 �
-11 1� �
Therefore, A = adj ( A) = �1 -3 2 �
det( A) 8

�1 5 2 �

Cramer’s Rule for Solving Systems of Equations: Suppose we are given a system of 2 equations

in 2 unknowns as follows:

a11 x1 + a12 x2 = b1
a21 x1 + a22 x2 = b2
D1 D b1 a12
Then, the solution is given by: x1 = and x2 = 2 , where D = det( A) , D1 = and
D D b2 a22
a11 b1
D2 =
a21 b2

Similarly, for a system involving three unknowns and three equations:

a11 x1 + a12 x2 + a13 x3 = b1


a21 x1 + a22 x2 + a23 x3 = b2
a31 x1 + a32 x2 + a33 x2 = b3
a11 a12 a13
D1 D2 D3
x1 = x2 = x3 = D = a21 a22 a23
The solution is given by D , D and D , where ,
a31 a32 a33

b1 a12 a13 a11 b1 a13 a11 a12 b1


D1 = b2 a22 a23 , D 2 = a21 b2 a23 and D 3 = a21 a22 b2
b3 a32 a33 a31 b3 a33 a31 a32 b3

Example: Solve using Cramer’s Rule:


© Copyright Virtual University of Pakistan 8


General Mathematics VU

x1 + 2 x2 + x3 = 1
2 x1 + 2 x2 = 2
3x1 + 5 x2 + 4 x3 = 1

Solution:
1 2 1 1 2 1
2 0 2 0 2 2 2 0 2 0 2 2
D = 2 2 0 =1 -2 +1 D1 = 2 2 0 = 1 -2 +1
5 4 3 4 3 5 , 5 4 1 4 1 5
3 5 4 1 5 4
= 1(8) - 2(8) + 1(4) = 8 - 16 + 4 = -4 = 1(8) - 2(8) + 1(8) = 8 - 16 + 8 = 0
1 1 1
2 0 2 0 2 2
D2 = 2 2 0 = 1 -1 +1
, 1 4 3 4 3 1 , and
3 1 4
= 1(8) - 1(8) + 1( -4) = 8 - 8 - 4 = -4
1 2 1
2 2 2 2 2 2
D3 = 2 2 2 = 1 -2 +1
5 1 3 1 3 5
3 5 1
= 1(-8) - 2(-4) + 1(4) = -8 + 8 + 4 = 4
D 0 D -4 D 4
So, by Cramer’s Rule: x1 = 1 = = 0 , x2 = 2 = = 1 , x3 = 3 = = -1 .
D -4 D -4 D -4

© Copyright Virtual University of Pakistan 9

You might also like