## Matrices III

• ### Inverse of a Matrix

Unlike numbers, the division operation is not defined for matrices. A similar (but not same) operation is to find the inverse of a matrix. Note that only square matrices can have inverses. When a square matrix $A$ is non-singular ($|A| \ne 0$), its inverse exists ($= A^{-1}$) and is unique.

Consider the number $1$. When we multiply any number by $1$, we get the same number and when we divide a number by $1$, we get its reciprocal.

Similarly, we have identity matrix $I$. When we multiply any matrix by $I$ (with appropriate order), we get the same matrix. When we multiply a matrix by its inverse, we get the identity matrix. Thus,

${4 \times \frac {1}{4} = 1 \ and \ A \times A^{-1} = I}$

For a matrix $A = \begin {bmatrix} 1 & 2 \\ 3 & 4 \end {bmatrix}$, we have $A^{-1} = \begin {bmatrix} -2 & 1 \\ \frac 3 2 & \frac {-1} 2 \end {bmatrix}$. If we do $A \times A^{-1}$, we get $\begin {bmatrix} 1 & 0 \\ 0 & 1 \end {bmatrix}$, which is a $2 \times 2$ identity matrix.

• ### Finding the Inverse Using Row Transformations

We know

${A \times A^{-1} = I}$

By some means, if we reduce $A$ to $I$, LHS will become $I \times A^{-1}$, which is $A^{-1}$. The matrix on the RHS will have to undergo the same set of transformations in same order, as we did on $A$ to get $I$.

The identity matrix on the right hand side will now get transformed to $A^{-1}$. Thus,

${I \times A^{-1} = A^{-1}}$

To find inverse of a $2 \times 2$ matrix using row transformations:

1) Make sure that the determinant of the matrix is non-zero.

2) Make $a_{11}=1$ by using transformation of the kind $c \times R_{1}$

3) Make all other elements in the 1st column $0$ by using transformations $R_2 + c R_1$

4) Make $a_{22}=1$ by using transformation of the kind $c \times R_{2}$

5) Make all other elements in the 2nd column $0$ by using transformations $R_1 + c R_2$

To find inverse of a $3 \times 3$ matrix using row transformations:

1) Make sure that the determinant of the matrix is non-zero.

2) Make $a_{11}=1$ by using transformation of the kind $c \times R_{1}$

3) Make all other elements in the 1st column $0$ by using transformations $R_2 + c R_1, R_3 + c R_1$

4) Make $a_{22}=1$ by using transformation of the kind $c \times R_{2}$

5) Make all other elements in the 2nd column $0$ by using transformations $R_1 + c R_2, R_3 + c R_2$

6) Make $a_{33}=1$ by using transformation of the kind $c \times R_{3}$

7) Make all other elements in the 3rd column $0$ by using transformations $R_1 + c R_3, R_2 + c R_3$

Notice the order by which we are transforming the given matrix into identity matrix. By performing the same sequence of transformations on identity matrix on the other side, we get the inverse.

• ### Finding the Inverse Using Column Transformations

To find inverse of a $2 \times 2$ matrix using column transformations:

1) Make sure that the determinant of the matrix is non-zero.

2) Make $a_{11}=1$ by using transformation of the kind $c \times C_{1}$

3) Make all other elements in the 1st row $0$ by using transformations $C_2 + c C_1$

4) Make $a_{22}=1$ by using transformation of the kind $c \times C_{2}$

5) Make all other elements in the 2nd row $0$ by using transformations $C_1 + c C_2$

To find inverse of a $3 \times 3$ matrix using column transformations:

1) Make sure that the determinant of the matrix is non-zero.

2) Make $a_{11}=1$ by using transformation of the kind $c \times C_{1}$

3) Make all other elements in the 1st row $0$ by using transformations $C_2 + c C_1, C_3 + c C_1$

4) Make $a_{22}=1$ by using transformation of the kind $c \times C_{2}$

5) Make all other elements in the 2nd row $0$ by using transformations $C_1 + c C_2, C_3 + c C_2$

6) Make $a_{33}=1$ by using transformation of the kind $c \times C_{3}$

7) Make all other elements in the 3rd row $0$ by using transformations $C_1 + c C_3, C_2 + c C_3$

• ### Finding the Inverse by Adjoint Method

$A^{-1}$ is given by

${A^{-1} = \frac {1}{|A|} \ adj \ A }$

The adjoint of A is a matrix obtained as follows:

1) Obtain $|A|$.

2) Obtain the matrix of minors. The minor of an element $a_{ij}$ is obtained by eliminating $i$th row and $j$th column and finding the determinant of the newly formed matrix. Knowing the concept of minor is essential. We will define the rank of matrix using this.

3) Obtain the matrix of cofactors. The cofactor of an element $a_{ij}$ is

${(-1)^{i+j} \times minor \ of \ a_{ij}}$

4) Take the transpose of matrix of cofactors. Transpose of a matrix is obtained by interchanging the rows and columns. This will be the adjoint. Thus,

${A^{-1} = \frac {1}{|A|} \ adj \ A}$

There is another method to find the inverse, which is using matrices in normal form. We will see this method in }.

• ### Solving a System of Simultaneous Equations Using Matrices

Consider the following system of equations:

${x+y+z = 6, \ 2y+5z = -4, \ 2x + 5y -z = 27}$

We want to find the values of $x,y$ and $z$, which will satisfy all 3 equations simultaneously. This system of equations can be written in matrix form as

${\begin {bmatrix} 1 & 1 & 1 \\ 0 & 2 & 5 \\ 2 & 5 & -1 \end {bmatrix} \begin {bmatrix} x \\ y \\ z \end {bmatrix} = \begin {bmatrix} 6 \\ -4 \\ 27 \end {bmatrix}}$

Let us call the $3 \times 3$ matrix $A$, the matrix on the RHS $B$ and the matrix of unknowns $X$. Thus, we have

${AX = B}$

There are 2 methods of solving this:

• ### Method 1 : Method of Inversion

In the method of inversion, we find the inverse of the matrix of the coefficients. \\

We know that $A \times A^{-1} = I$. On pre-multiplying both sides of $AX = B$ by $A^{-1}$, we get $A^{-1} \times A B = A^{-1}B$, i.e. $I X = A^{-1}B$ i.e. $X = A^{-1}B$.

So, all we have to do is first find the inverse of $A$ and then pre-multiply $B$ by $A^{-1}$.

In this example,

${A^{-1} = \frac {1}{-21} \begin {bmatrix} -27 & 6 & 3 \\ 10 & -3 & -5 \\ -4 & -3 & 2 \end {bmatrix}}$

So,

${X = \begin {bmatrix} x \\ y \\ z \end {bmatrix} = \frac {1}{-21} \begin {bmatrix} -27 & 6 & 3 \\ 10 & -3 & -5 \\ -4 & -3 & 2 \end {bmatrix} \times \begin {bmatrix} 6 \\ -4 \\ 27 \end {bmatrix}= \begin {bmatrix} 5 \\ 3 \\-2 \end {bmatrix}}$

Thus, $x=5, y=3$ and $z= -2$.

• ### Method 2 : Method of Reduction

In this method, we reduce $A$ to an upper-triangular matrix by performing row operations. Same operations are to be performed on matrix $B$ in same sequence. Ultimately, we are left with following matrix:

${\begin {bmatrix} . & . & . \\ 0 & . & . \\ 0 & 0 & . \end {bmatrix} \begin {bmatrix} x \\ y \\z \end {bmatrix} = \begin {bmatrix} . \\ . \\ . \end {bmatrix}}$

So, we obtain $z$ from the last row, then we get $y$ from the 2nd row and then, $x$ from the 1st row.

[Note – Try it and see whether you get the same values o $x,y$ and $z$ as by inversion method.]

## Matrices II

• ### Addition and Subtraction of 2 Matrices

2 matrices $A$ and $B$ can be added to or subtracted from each other ONLY WHEN THEIR ORDER IS SAME. These operations are performed element-wise. e.g.

${A = \begin {bmatrix} 1 & 2 & 3 \\ 9 & 6 & 4 \end {bmatrix}, B = \begin {bmatrix} 5 & 3 & 4 \\ 0 & 0 & 2 \end {bmatrix}}$

Then,

${A+B = \begin {bmatrix} 1+5 & 2+3 & 3+4 \\ 9+0 & 6+0 & 4+2 \end {bmatrix} = \begin {bmatrix} 6 & 5 & 7 \\ 9 & 6 & 6 \end {bmatrix}}$

${A-B = \begin {bmatrix} 1-5 & 2-3 & 3-4 \\ 9-0 & 6-0 & 4-2 \end {bmatrix} =\begin {bmatrix} -4 & -1 & -1 \\ 9 & 6 & 2 \end {bmatrix}}$

$A+B$ is always equal to $B+A$, but $A-B$ may not always be equal to $B-A$. We say matrix addition is commutative, but matrix subtraction is not commutative.

• ### Multiplication of 2 Matrices

The multiplication operation is unique to the matrices in the way it is defined. It has immense applications in various fields. Please note how it is performed:

When $B$ is to be postmultiplied with $A$, i.e. $A \times B$, the number of columns in $A$ must be equal to the number of rows in $B$.

Let ${A_{2 \times 3} = \begin {bmatrix} 1 & 2 & 3 \\ 9 & 6 & 4 \end {bmatrix}}$ and ${B_{3 \times 4} = \begin {bmatrix} 2 & 5 & -3 & 0 \\ 1 & 7 & -3 & 2 \\ -5 & 6 & 2 & 0 \end {bmatrix}}$.

Number of rows in $A$ = number of columns in $B$. Hence, $A \times B$ is possible and is given by:

${A \times B = \begin {bmatrix} 1(2)+ 2(1)+ 3(-5)& 1(5)+2(7)+3(6) & 1(-3)+2(-3)+3(2) & 1(0)+2(2)+3(0)\\ 9(2)+ 6(1)+ 4(-5)& 9(5)+6(7)+4(6) & 9(-3)+6(-3)+4(2) & 9(0)+6(2)+4(0) \end {bmatrix}}$

${A \times B = \begin {bmatrix} -11 & 37 & -3 & 4 \\ 4 & 111 & -37 & 18 \end {bmatrix}}$

Note that number of rows in $A \times B$ is equal to the number of rows in $A$ and number of columns in $A \times B$ is equal to the number of columns in $B$.

It is not possible to premultiply $A$ by $B$, i.e. $B \times A$, because number of columns in $B$ is NOT equal to number of rows in $A$.

• ### Elementary Transformations of a Matrix

A transformation transforms a matrix to another. There are 2 types of elementary transformations viz.

• #### Row Transformations

Consider ${A = \begin {bmatrix} 1 & 2 & 3 \\ 9 & 6 & 4 \end {bmatrix}}$.

1) ${R_{i}+ c{R_j}}$

Take $i$th row. To each element of $R_i$, add the number $c \times R_j$, such that both elements belong to same column. For example, $R_2 + 2 R_1$ would give,

${\begin {bmatrix} 1 & 2 & 3 \\ 9+2(1) & 6+2(2) & 4+2(3) \end {bmatrix} = \begin {bmatrix} 1 & 2 & 3 \\ 11 & 10 & 10 \end {bmatrix}}$

Call this matrix $D$.

2) ${c R_i}$

Take $i$th row. Multiply each element of $R_i$ by a constant $c$. For example, the matrix $D$ will get transformed to another matrix under $\frac 1 2 R_1$.

${\begin {bmatrix} \frac 1 2 & \frac 2 2 & \frac 3 2 \\ 11 & 10 & 10 \end {bmatrix} = \begin {bmatrix} 0.5 & 1 & 1.5 \\ 11 & 10 & 10 \end {bmatrix}}$

• #### Column Transformations

Again consider ${A = \begin {bmatrix} 1 & 2 & 3 \\ 9 & 6 & 4 \end {bmatrix}}$.

1) ${C_{i}+ c{C_j}}$

Take $i$th column. To each element of $C_i$, add the number $c \times C_j$, such that both elements belong to same row. For example, $C_2 + 2 C_1$ would give,

${\begin {bmatrix} 1 & 2+2(1) & 3 \\ 9 & 6+2(9) & 4 \end {bmatrix}= \begin {bmatrix} 1 & 4 & 3 \\ 9 & 24 & 4 \end {bmatrix}}$

Call this matrix $E$.

2) ${c C_i}$

Take $i$th column. Multiply each element of $C_i$ by a constant $c$. For example, the matrix $E$ will get transformed to another matrix under $\frac 1 4 C_3$.

${\begin {bmatrix} 1 & 4& \frac 3 4 \\ 9 & 24 & \frac 4 4 \end {bmatrix} = \begin {bmatrix} 1 & 4 & 0.75 \\ 9 & 24 & 1 \end {bmatrix}}$

NOTE: The transformations are a very useful tool in obtaining inverse of a matrix.

## Matrices I

• ### Introduction

A matrix (plural : matrices) is a rectangular arrangement of $m \times n$ numbers in $m$ rows and $n$ columns. It is written in between a pair of rectangular brackets. The numbers belonging to a matrix are known as its elements. Matrices are represented by capital Roman letters. For example, consider the following matrix $M$.

${M = \begin{bmatrix} 2& 3 & 0 \\[0.3em] 1 & -3 & \sqrt 2 \end{bmatrix}}$

It has 2 rows and 3 columns. Hence it is a $2 \times 3$ matrix.

If a matrix has $m$ rows and $n$ columns, it is said to be of the order $m$ by $n$. So, $M$ is of the order 2 by 3 and has 6 elements.

• ### Representation of an Element

$a_{ij}$ corresponds to that element of a matrix, which is present in the $i$th row and $j$th column of it. So, for matrix $M$,

${a_{21} = 1, a_{13}= 0, a_{23}= \sqrt 2}$

• ### Transpose of a matrix

A matrix obtained by interchanging the rows and columns of a matrix is known as the transpose of the matrix. So,

$M^T = \begin{bmatrix} 2& 1 \\[0.3em] 3 & -3 \\[0.3em] 0 & \sqrt 2 \end{bmatrix}$

• ### Equality of 2 matrices

2 matrices A and B are equal iff (if and only if)

i) their order is same and

ii) $\forall$ $a$ in $A$ and $b$ in $B$, $a_{ij}= b_{ij}$

• ### Row Matrix

A row matrix has only 1 row and more than 1 column. e.g.

${P = [1 \ 3 \ 2]}$

• ### Column Matrix

A column matrix has only 1 column and more than 1 row. e.g.

${Q = \begin {bmatrix} 2 \\ 3 \\ 5 \\ 6 \end {bmatrix}}$

• ### Null Matrix

A null matrix is the one, whose all elements are $0$. e.g.

${R = \begin {bmatrix} 0 & 0 \\ 0 & 0 \\ 0 & 0 \\ 0 & 0 \end {bmatrix}}$

• ### Square Matrix

A square matrix has equal number of rows and columns. So, the total number of elements in a square matrix is always a perfect square. e.g.

${S = \begin {bmatrix} 1 & 4 & \sqrt 5 & -6 \\ 77 & 64 & \frac 1 2 & 0 \\ e & \pi & 5 & 3 \\ 0 & 1 & 1 & 4 \end {bmatrix}}$

So, $S$ has 4 rows as well as 4 columns, so 16 elements.

The elements $a_{ij}$ of a square matrix, for which $i=j$ are known as the diagonal elements. Thus, $1,64, 5$ and $4$ are diagonal elements of $S$.

• ### Diagonal Matrix

A square matrix, whose all elements are zero, except the diagonal elements, is known as the diagonal matrix.e.g.

${D = \begin {bmatrix} 3 & 0 & 0 \\ 0 & -8 & 0 \\ 0 & 0 & 13 \end {bmatrix}}$

• ### Identity Matrix

An identity matrix is a square matrix, whose diagonal elements are equal to 1 and all other elements are 0. This matrix is of special importance in the matrix theory. Similar to the number $1$ in the theory of numbers, it acts as a unit entity. It is generally denoted by $I$. So, for any square matrix $A$, $AI = A$. Note that $A$ and $I$ must have the same order.

${I_{2} = \begin {bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}}$

${I_{3} = \begin {bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end {bmatrix}}$

• ### Upper- and Lower-Triangular Matrices

An upper-triangular matrix is the one, whose elements below the diagonal are $0$. Similarly, a lower-triangular matrix is the one, whose elements above the diagonal are $0$.

${U = \begin {bmatrix} 1 & 5 & 6 \\ 0 & 3 & 9 \\ 0 & 0 & 34 \end {bmatrix}}$

${L = \begin {bmatrix} 6 & 0 & 0 \\ 2 & 2 & 0 \\ 3 & 5 & 5 \end {bmatrix}}$