Matrix

Matrix is a rectangular arrangement of numbers, arranged in horizontal rows and vertical columns. Plural of matrix is matrices. e.g.

$\displaystyle \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{bmatrix} \text{ , } \begin{bmatrix} 1 & 2 & 3 \end{bmatrix} \text{ , } \begin{bmatrix} 1 & 2 \\ 4 & 5 \\ 7 & 8 \end{bmatrix}$

Note:

1. Each entity or number in a matrix is called an element.
2. In any matrix Horizontal lines are called rows while the vertical lines are called columns.

Order of Matrix

If a matrix has $\displaystyle m$ columns and $\displaystyle n$ rows, then the order is written as $\displaystyle m \times n$.

$\displaystyle \text{So for example in } \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{bmatrix} \text{ , } m=3 \text{ and } n=3 \text{. Hence order } = 3 \times 3$.

Matrices are normally denoted by capital letters. If $\displaystyle A$ is a matrix with $\displaystyle m$ rows and $\displaystyle n$ columns, then it is denoted as $\displaystyle A_{m \times n}$.

Elements of a Matrix

Each entity or number in a matrix is called an element.

If $\displaystyle A$ is a matrix with $\displaystyle m$ rows and $\displaystyle n$ columns, then the number of elements would be $\displaystyle m \times n$.

Types of Matrices

$\displaystyle \text{Row Matrix: This is a matrix, that has only one row. e.g. } \begin{bmatrix} 1 & 2 & 3 \end{bmatrix}$

$\displaystyle \text{Column Matrix: This is a matrix, that has only one column. e.g. } \begin{bmatrix} 1 \\ 4 \\ 7 \end{bmatrix}$

$\displaystyle \text{Square Matrix: Where the number of rows are equal to number of columns. e.g. } \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{bmatrix}$

$\displaystyle \text{Rectangular Matrix: Where the number of rows are not equal to number of columns. e.g. } \begin{bmatrix} 1 & 2 & 3 & 4 \\ 4 & 5 & 6 & 7 \\ 7 & 8 & 9 & 10 \end{bmatrix}$

Zero or Null Matrix: If each element of a matrix is 0, then it is called Zero or Null  $\displaystyle \text{Matrix. e.g.} \begin{bmatrix} 0 & 0 & 0 \end{bmatrix} \text{ , } \begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix} \text{ , } \begin{bmatrix} 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \end{bmatrix}$

Diagonal Matrix: This is a square matrix, where all elements are 0 except the  $\displaystyle \text{ones on the leading diagonal. e.g.} \begin{bmatrix} 1 & 0 & 0 \\ 0 & 5 & 0 \\ 0 & 0 & 9 \end{bmatrix}$

Unit or Identity Matrix: A diagonal matrix, where each element of the leading  $\displaystyle \text{diagonal is 1 is called Unit or Identity matrix. e.g.} \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} \text{ , } \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}$

Transpose a Matrix

Transpose of a matrix is obtained by interchanging its rows and columns. Transpose of a matrix $\displaystyle A \ is\ A'$. e.g:

$\displaystyle \text{If } A= \begin{bmatrix} 1 & 2 \\ 4 & 5 \\ 7 & 8 \end{bmatrix} \text{, then } A' = \begin{bmatrix} 1 & 4 & 7 \\ 2 & 5 & 8 \end{bmatrix}$

Equality of Matrices

Two matrices A and B are said to be equal if:

1. The matrices have the same order
2. the corresponding elements of the two matrices are the same.

$\displaystyle \text{e.g. If } A= \begin{bmatrix} 1 & 2 \\ 4 & 5 \\ 7 & 8 \end{bmatrix} \text{, and } B= \begin{bmatrix} 1 & 2 \\ 4 & 5 \\ 7 & 8 \end{bmatrix} \text{, then } A = B$

Two matrices can be added only if the order of the two matrices is the same. To add two matrices of the same order, just add the corresponding terms. e.g.

$\displaystyle \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} + \begin{bmatrix} 5 & 6 \\ 7 & 8 \end{bmatrix} = \begin{bmatrix} 1+5 & 2+6 \\ 3+7 & 4+8 \end{bmatrix} = \begin{bmatrix} 6 & 8 \\ 10 & 12 \end{bmatrix}$

Subtraction of Matrix

Two matrices can be subtracted only if the order of the two matrices is the same. To subtract two matrices of the same order, just subtract the corresponding terms. e.g.

$\displaystyle \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} - \begin{bmatrix} 5 & 6 \\ 2 & 3 \end{bmatrix} = \begin{bmatrix} 1-5 & 2-6 \\ 3-2 & 4-3 \end{bmatrix} = \begin{bmatrix} -4 & -4 \\ 1 & 1 \end{bmatrix}$

Note: If $\displaystyle A, B \ and\ C$ are matrices of the same order, then:

1. $\displaystyle A + B = B + A$ (addition of matrices is commutative)
2. $\displaystyle A + (B + C) = (A+B)+C$ (addition of matrices is associative)
3. $\displaystyle A+X=B \Rightarrow X=B-A$

Additive Identity of a Matrix

0 is called the additive identity of any number because the number does not change. Similarly, there is an additive identity of a matrix as well.

If a matrix is added to a null matrix of the same order, the matrix remains unchanged. Hence the null matrix of the same order is called the Additive Identity of the matrix. e.g.

$\displaystyle \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} + \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix} = \begin{bmatrix} 1+0 & 2+0 \\ 3+0 & 4+0 \end{bmatrix} = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}$

Additive Inverse of a Matrix

If $\displaystyle A and B$ are two matrices of the same order such that $\displaystyle A+B=B+A=Null$ matrix, then $\displaystyle A$ is called the additive inverse of $\displaystyle B$ and $\displaystyle B$ is called the additive inverse of $\displaystyle A$ . Additive inverse of $\displaystyle A is -A$ (just multiply $\displaystyle A$ by $\displaystyle -1$ ). e.g.

$\displaystyle \text{If } A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} \text{, then } -A = \begin{bmatrix} -1 & -2 \\ -3 & -4 \end{bmatrix} \text{ which is the additive inverse of } A$

$\displaystyle A + (-A) = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} + \begin{bmatrix} -1 & -2 \\ -3 & -4 \end{bmatrix} = \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix}$

Multiplication of Matrix by a scalar (real number)

Case 1:

To multiply a matrix by a scalar, just multiply each of the elements of the matrix by the scalar. e.g.

$\displaystyle 3 \times \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} = \begin{bmatrix} 3 \times 1 & 3 \times 2 \\ 3 \times 3 & 3 \times 4 \end{bmatrix} = \begin{bmatrix} 3 & 6 \\ 9 & 12 \end{bmatrix}$

Case 2:

Multiplication of two matrices: Two matrices A and B can be multiplied to each other only if the number of columns in A is equal to the number of rows in B. e.g.

$\displaystyle \text{Let } A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} \text{ and } B = \begin{bmatrix} 4 & 5 \\ 7 & 8 \end{bmatrix}$

A number of columns in A = 2 which is equal to the number of rows in B=2. Hence we can multiply these matrices.

$\displaystyle A \times B = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} \times \begin{bmatrix} 4 & 5 \\ 7 & 8 \end{bmatrix} = \begin{bmatrix} 1 \times 4 + 2 \times 7 & 1 \times 5 + 2 \times 8 \\ 3 \times 4 + 4 \times 7 & 3 \times 5 + 4 \times 8 \end{bmatrix} = \begin{bmatrix} 18 & 21 \\ 40 & 47 \end{bmatrix}$

Identity Matrix for Multiplication

If $\displaystyle A$ is any matrix, then the identity matrix of $\displaystyle A \ is \ I$ (unit matrix of the same order as that of $\displaystyle A$). In that case, $\displaystyle A \times I = I \times A$

$\displaystyle \text{Let } A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}$

Then

$\displaystyle A \times I = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} \times \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} = \begin{bmatrix} 1 \times 1 + 2 \times 0 & 1 \times 0 + 2 \times 1 \\ 3 \times 1 + 4 \times 0 & 3 \times 0 + 4 \times 1 \end{bmatrix} = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}$

$\displaystyle \therefore A \times I = I \times A = A$

Note: If the order of matrix $\displaystyle A \ is\ m \times n$ and the order of matrix $\displaystyle B \ is \ n \times p$, then the product $\displaystyle A \times B$ is possible (because $\displaystyle \ number \ of \ columns \ of \ A = n = \ number \ of \ rows \ of \ B$). If $\displaystyle C$ is the product matrix, then the order of matrix $\displaystyle C \ is\ m \times p$.

$\displaystyle A_{m \times n} \times B_{n \times p} = C_{m \times p}$

Note:

For any three matrices $\displaystyle A, \ B \ and \ C$, which are compatible for multiplication, $\displaystyle ABC=A(BC)$. Similarly $\displaystyle BAC= B(AC) \ and CBA=C(BA)$ i.e. product of matrices is associative.

Normally $\displaystyle AB \neq BA$ unless $\displaystyle A=B$. Multiplication of matrices is not commutative.

If $\displaystyle A \neq 0, \ and \ AB=AC$ then it is not necessary that $\displaystyle B=C$

If $\displaystyle AB=0$, then it is not necessary that $\displaystyle A=0 or B=0$

If $\displaystyle A=0 \ or\ B=0$, then $\displaystyle AB=0=BA$

$\displaystyle A(B+C)=AB+AC \ or\ (A+B)C=AB+BC$ i.e. multiplication is distributive over addition i matrices. In the same way $\displaystyle A(B-C)=AB-AC \ and\ (A-B)C=AC-BC$