Module ID QT 14
(1) E- Text
Matrix algebra is an important branch of mathematics dealing with the handling of the large
body of data for its tabulation, representation and statistical analysis. It helps in representing
large body of equations and their mathematical analysis in a fast and concise way. In this age of
quantitative revolution, world is flooded with huge amount of data in every walk of the life and
computers play an important role in analyzing the data in a much faster way. Most of
theComputer software for multivariate analyses, therefore, require data input in matrix forms
only.
Definition
Matrix is an arrangement of numbers in a rectangular form of rows and columns like the one
given below.
2 4 6
[7 3 1]
3 1 9
A matrix could have several rows and columns. In the above case the matrix has three columns
5 2
and three rows. A matrix of three rows and two columns would look like: [8 2]similarly a
4 7
5 6 2
matrix with two rows and three columns would look like: [ ] . A matrix which only one
1 3 7
5
column is known as a column vector like: [3] and similarly a matrix with only one row is known
8
as a row vector like; [12 5 11]. Number of rows and columns of a matrix are kwon as it
dimensions and are written as mxn which means m-rows and n- columns. If the dimensions of a
matrix are 3x3 it means 3 rows and 3 columns. Similarly the dimensions of a matrix with 4 rows
and 7 columns will be written as 4x7.. A matrix which has equal number of rows and columns is
known as square matrix, like 2x2, 3x3, 4x4 , 6x6 etc . If number of columns and rows of the
matrix are not equal it is known as rectangular matrix. However a matrix with one column or
one row only is known as vector. Dimensions of a four value column vector will be 4x1, as it will
have 4 rows and only one column and a 5 values row vector will be 1x5 as it will have one row
only but five columns. Each element of a matrix is known as an element and is denoted by
aij,where I and j are known as subscript and represent the number of row and column
respectively. The element a2x3 means the element corresponding to 2nd row and 3rd column.
The elements of a square matrix corresponding to same row and column like a1x1, a2x2 ,
a3x3….. etc are know as principal diagonal elements.
There are certain types of matrices which have their equivalence in arithmetic. For example
equivalence of zero in arithmetic is null matrix in matrix algebra:
Null Matrix
A null matrix is a square matrix whose all cell values are zero. Like a 3x3null matrix would
0 0 0
be:[0 0 0] .
0 0 0
Identity or unit matrix
Similarly equivalence of Unity or one in matrix is an Identity matrix which is a square matrix
whose all the diagonal elements are one and the off diagonal elementsare all zeros. A 2x2
1 0 0
1 0
identity matrix would be: [ ]and a 3x3 Identity matrix would be:[0 1 0]. An identity
0 1
0 0 1
matrix is denoted I.
Diagonal Matrix
A matrix whose all off diagonal elements are all zeros but diagonal elements are other than
2 0 0
zeros is known as diagonal matrix. For example the matrix [0 3 0] is a diagonal matrix.
0 0 9
Symmetric Matrix
A square matrix whose element aijis equal to element aji is known as symmetric matrix. The
2 7 3
matrix [7 3 1] is a symmetric matrix as among all of its off diagonal elements aij = aji. One
3 1 9
can verify that element a2x3 = a3x2 =1 , element a1x3= a3x1 = 3 and element a1x2 = a2x1=7.
2 6
Likewise [ ]Is a 2x2 symmetric matrix. Similarly we can have symmetric matrix ( square)of
6 7
any other dimensions also.
Transpose of a matrix
If the rows and columns of a matrix A are interchanged, the new matrix is known as transpose
5 2
of A and is represented by a dash on it, for example if we have A = [8 2] transpose of A′ =
4 7
3 2 7
[ ] we note that in transpose the dimensions also change. Number of rows become
1 2 3
number of columns and number of columns become number of rows. In the present case A is a
3 x 2 matrix but A’ is a 2 x 3 matrix. A row vector after transpose will become a column vector.
A symmetric matrix, however, remains unchanged after transpose. Thus another definition of a
square symmetric matrix is that if A’ = A , the matrix is said to be symmetrical.
Scalar Matrix
Any square matrix whose all the diagonal elements are equal and all the off diagonal elements
2 0 0
8 0
are zero is known as diagonal matrix. For example a matrices[ ] and [0 3 0]
0 8
0 0 9
are scalar matrices of the order of 2x2 and 3x3.
Like simple algebra all the four arithmetic operations are possible in matrix also. In matrix
algebra these operations of different sets of numbers are performed simultaneously.
Two matrices of identical dimensions can be added or subtracted by adding or subtracting their
values of the corresponding elements. It is to be noted that if the dimensions of any two
matrices are not equal they cannot be added or subtracted.
Example
3 5 8 1 0 4 4 5 12
[2 3 2 ] + [1 4 6 ] = [3 7 8]
1 0 6 7 3 9 8 3 15
One can verify that the value of the elements of the last matrix giving the sum is the sum of the
values of the corresponding elements of the given matrices. For example 3 + 1 = 4 is the sumof
the values of first row and first column of two matrices.
3 5 8 1 0 4 2 5 4
[2 3 2] − [1 4 6] = [ 1 −1 −4]
1 0 6 7 3 9 −6 −3 −3
The resultant matrix will have the difference of the corresponding values of the two matrices as
show above.
Matrix Multiplication
Multiplication of two matrices also involves multiplication of their elements but in a different
way. It takes the elements of the first row of the first matrix and multiply the corresponding
elements of the first column of the second matrix to get a1x1 of the product matrix. Thus
number of columns of first matrix ( number of elements in it ) should be equal to number of
rows ( number of elements in the columns )of the second matrix should be equal. Similarly we
repeat the process by taking the second column of the second matrix we get the value of a1x2
of the product matrix. By changing the columns of the second matrix, retaining the first column
of the first matrix we get different values of the first row of the product matrix. We repeat the
process by taking the second row of the first matrix and get different values for the second row
of the product matrix . At the end we get the values of the product matrix with rows equal to
the number of rows of the first matrix and columns equal to number of columns of the second
matrix. So if the dimensions of the two matrices are 3x4 and 4x5, the dimension of the product
matrix will be 3x5. Note that number of columns of the first matrix is 4 and number of columns
of the second matrix is also 4 The two matrices can be multiplied and the dimensions of the
product matrix will be 3x5 i.e. number of rows of first matrix 3 and number of columns of the
second matrix 5.
ExampleIf,
2 5 6 8
A =[ ] 𝑎𝑛𝑑 𝐵 = [ ]
3 1 7 4
2 5 6 8 2𝑥6 + 5𝑥7 2 𝑥 8 + 5 𝑥 4 47 36
𝐴𝑥𝐵 =[ ] 𝑥[ ]=[ ]= [ ]
3 1 7 4 3𝑥6+1𝑥7 3𝑥8+1𝑥4 25 28
And
6 8 2 5 6 𝑥2 + 8 𝑥 3 6 𝑥5 + 8 𝑥1 36 38
BxA=[ ]x[ ] =[ ]= [ ]
7 4 3 1 7 𝑥2 + 4𝑥 3 7 𝑥 5 + 4 𝑥1 26 39
We note that the two matrices can be multiplied as they have required dimensions but the two
product are not same i.e. A x B ≠ B x A. Also note that when an Identity or unit matrix is
multiplied to any matrix confirming the dimensions, the product is the matrix itself i.e. I x A = A
and A x I =A. Thus the commutative law will hold good only if one of the factor matrix is identity
matrix. i.e. I xA = I x A
First multiplier is known as pre factor and the second is known as post factor.
Example
1 3 2
3 2 7
A=[ ] and B = [5 4 1] they can be multiplied as shown below:
1 2 3
2 5 7
Scalar Multiplication
In any square matrix if we delete the ith row and jth column the determinant of the remaining
matrix is known as the minor of element a i x j. Every element will have a minor and if these
+ − +
minors are attached with a sign given in the sequence [− + 1 … .. ] these are known
+ − +
as corresponding cofactors of every a i x j and is denoted by Aij.
Every square matrix has a value which is known its determinant and is denoted by two vertical
lines on either side of it. The determinant of a square matrix A will be denoted by I A I.
Determinant of a 2 x 2 square matrix is worked out by taking the difference of the product of
diagonal terms and the product of remaining off diagonal terms. For a three by three
𝑎11 𝑎12 𝑎33
matrix[𝑎21 𝑎22 𝑎23] the determinant will be a11 x I A11I + a12 x IA12I + a13 x A13. Thus
𝑎31 𝑎32 𝑎33
for a three by three matrix
2 3 5
0 −2 1 −2
A = [1 0 −2] Determinant A = 2x det. [ ] + 3(− ) 𝑥𝑑𝑒𝑡. [ ]+
−5 −6 0 −6
0 −5 −6
1 0
5 x det. [ ].
0 −5
2(0x-6 – (-2)x(-5) ) – 3 (1x (-6) – 0 x (-2)) + 5 (1x ( -5) – 0x0 ) = -20 +18 - 25 = -27.
Properties of determinants.
1. Interchanging of rows and columns will not change the value of the determinant.
2. In any row or column if all the values are zeros, the value of the determinant will be
zero.
3. Interchanging any two rows or columns will reverse the sign of the value of the
determinant.
4. If any two rows or column of a matrix are same the value of the determinant will be
zero.
5. If the values of any row or column are multiplied by a constant the value of the
determinant will also get multiplied by that constant.
6. If to any row or column any other row or column is added after multiplying by a
constant, the value of the determinant will not change.
Transpose of a matrix formed by the cofactors of its each element is known as its adjoint. For
example if we have a matrix A =
3 2 3 −4
[ ] , its cofactor matrix is [ ] adjoin of A will be its transpose.
4 3 −2 3
3 −2
Thus, Ajoin A = [ ]
−4 3
2 3 1
For the adjoint of a square matrix A = [1 5 3]
4 2 1
−1 11 −18
The cofactor matrix is = [−1 −2 8 ] and its transpose is adjoint of A. Thus,
4 −5 7
−1 −1 4
Adjoint A = [ 11 −2 −5]
−18 8 7
Inverse of a matrix
Inverse of a matrix is equivalent to division in arithmetic but in a very indirect way. In arithmetic
if a number A is divided by another number B , we get AxB=1 and B is said to be the inverse of A
and A inverse is B. A inverse is denoted by A-1.
2 3 4/5 −3/5 1 0
Example. Given A= [ ], B= [ ] we find that A x B = [ ] and A is said to be
1 4 −1/5 2/5 0 1
the inverse of B.Thus if we have to divide any matrix by another matrix say A, we can achieve it
by multiplying the matrix by A-1.
The inverse of a non singular symmetric matrix A is worked out by using the relationshipA-1
1
=IAI ∗ Adjoint A, provided IAI is not zero i.e. A is a non-singular matrix.
2 3
Example: Find the inverse of matrix A = [ ]
4 −1
IAI = (-1) x2 – 4x3 = - 14
1 0
We can verify A xA-1= [ ]
0 1
1 2 3
Example: Find the inverse of A = [ 2 5 7]
−4 −4 −5
IAI = 1x(5x(-5) – (-4)x 7) – 2 (2x(-5)-(-4)x7 – 2 (-5) + 3 (2x (-4) – 5x (-4) =1
3 −2 −1
A-1= 1/IAI .Adjoint A = [−4 1 −1] we can verify A xA-1= Identity matrix of the order of 3x3.
2 0 1
Note that as the dimensions of matrix increases computation of its inverse becomes more and
more difficult and we have to take the help of computers and statistical packages for its
calculations.
Biggest advantage of matrix methods is that it can simultaneously handle a large body of
information. Taking advantage of this property we can represent and solve a large number of
equations in a concise and efficient manner. For example if we have a set of three simultaneous
linear equations in three variables X1, X2 and X3 as given below:
This system of three simultaneous linear equations can also be written in matrix form as:
AX=C
where A is a 3x3 square matrix and X an C are column vectors ( matrix of the order of 3 x 1).
Solution of these equations is possible by pre-multiplying both the sides by A-1
X = A-1 C
Note that (A-1A)= I multiplication of I with X will not change X .The above equation will hold
good for any number of variables with the condition that number of independent equations
should be equal to the number of variables to give us a non singular symmetric matrix of A. In
case the number of equations are not independent, matrix A will become singular and inverse
of matrix A will not exit.
Example
X1 + 2 X2 + 3 X3 =14
4X1 + 5 X2 + 6 X3 = 32
6X1 + 7 X2 + 9 X3 = 47
In matrix notation we can write the above system of simultaneous equations as AX =C wher:
1 2 3 𝑋1 14
A =[4 5 6] , X = [𝑋2] and C = [32]
6 7 9 𝑋3 47
−1 −1 1
As shown above the inverse of A is found to be[ 0 3 −2]
2/3 −5/3 1
−1 −1 1 14 1
[ 0 3 −2] [32] = [2]
2/3 −5/3 1 47 3