Introduction to matrices

Introduction to Matrices

In broad sense the meaning of a matrix is an arrangement of things; things may be books or people or tasks or price or names or numbers etc. The Sudoku block is an example of a matrix. In Mathematics generally entries in matrices are numerical values.

There are huge number of applications of matrices in today's era. In fact matrices are one of the powerful tools of mathematics used in the development of IT (information technology), ML (machine learning) and AI (artificial intelligence). In coding-decoding theory matrices plays an important role. Here we review some of the basic definitions and few types of matrices in simple way. We begin with the definition of the matrix.

Definition of Matrix

An $m\times n$ matrix is a rectangular arrangement of $mn$ numbers in $m$ rows and $n$ columns bounded by the square bracket [ ] or round brackets ( ). Matrices are denoted by capital letters $A, B, \cdots$. A typical form of an $m\times n$ matrix is given by

$$ \begin{equation*} A = \begin{bmatrix} a_{11} & a_{12} & \ldots & a_{1j} & \ldots & a_{1n}\\ a_{21} & a_{22} & \ldots & a_{2j} & \ldots & a_{2n}\\ \vdots & \vdots & \vdots & \vdots & \vdots & \vdots\\ a_{i1} & a_{i2} & \ldots & a_{ij} & \ldots & a_{in}\\ \vdots & \vdots & \vdots & \vdots & \vdots & \vdots\\ a_{m1} & a_{m2} & \ldots & a_{mj} & \ldots & a_{mn}\\ \end{bmatrix}_{m\times n} \end{equation*} $$

Often an $m\times n$ matrix $A$ is denoted by $A=[a_{ij}]_{m\times n}$, where $a_{ij}$ is the entry of $i^{\text{th}}$ row and $j^{\text{th}}$ column; $i=1,2,\ldots m$ and $j=1,2,\ldots n$.

Examples of Matrices

Consider few examples of matrices:

$$ \begin{equation*} A=\begin{bmatrix} 1 & 7 & 2 & 9\\ 2 & 0 & 0 & 5\\ 1 & 9 & 8 & 3 \end{bmatrix}_{3\times 4} \end{equation*} $$

Here $m=\text{number of rows}=3$ and $n=\text{number of columns}=4$. We say $A$ is a matrix of size $3\times 4$ (read as three by four).

$$ \begin{equation*} B=\left[\begin{matrix} 1 & 2 & 9\\ 2 & 0 & 5\\ 1 & 9 & 8\end{matrix}\right]_{3\times 3} \end{equation*} $$

Here $m=\text{number of rows}=3$ and $n=\text{number of columns}=3$. We say $B$ is a matrix of size $3\times 3$ (read as three by three).

Types of Matrices

Let us discuss some types of matrices. In literature there are various types of matrices few of them are as follows:

Zero Matrix

A matrix $O=[o_{ij}]_{m\times n}$ is called a zero matrix if all the entries of the matrix are 0. Usually the zero matrix is denoted by $O$.

Examples of zero Matrices

  • $O=\left[\begin{matrix}0\end{matrix}\right]_{1\times 1}$ is a zero matrix of order $1\times 1$.

  • $O=\left[\begin{matrix} 0 & 0\\ 0 & 0\end{matrix}\right]_{2\times 2}$ is a zero matrix of order $2\times 2$.

  • $O=\left[\begin{matrix} 0 & 0 & 0\\ 0 & 0 & 0\end{matrix}\right]_{2\times 3}$ is a zero matrix of order $2\times 3$.

  • $O=\left[\begin{matrix} 0 & 0 & 0\\ 0 & 0 & 0\\ 0 & 0 & 0\end{matrix}\right]_{3\times 3}$ is a zero matrix of order $3\times 3$.

Row Matrix

A matrix having exactly one row but any number of columns is called a row matrix. In other words, a matrix $A=[a_{ij}]_{m\times n}$ is called a row matrix if $m=1$ i.e. it has only one row.

Examples of Row Matrices

  • $A=\left[\begin{matrix}3\end{matrix}\right]$ is a row matrix of of order $1\times 1$.

  • $B=\left[\begin{matrix} 1 & 0 & -3\end{matrix}\right]$ is a row matrix of of order $1\times 3$.

  • $C=\left[\begin{matrix} 0 & 0 & 0 & 0\end{matrix}\right]$ is a row matrix of of order $1\times 4$.

  • $D=\left[\begin{matrix} 2 & 5 & -3 & 8 & 7\end{matrix}\right]$ is a row matrix of of order $1\times 5$.

Column Matrix

A matrix having exactly one column but any number of rows is called a column matrix. In other words, a matrix $A=[a_{ij}]_{m\times n}$ is called a column matrix if $n=1$ i.e. it has only one column.

Examples of Column Matrices

  • $A=\left[\begin{matrix}5\end{matrix}\right]_{1\times 1}$ is a column matrix of order $1\times 1$.

  • $B=\left[\begin{matrix} 0\\ 1\\ 0\end{matrix}\right]_{3\times 1}$ is a column matrix of order $3\times 1$.

  • $C=\left[\begin{matrix} 2\\ 0\\ 3\\ 3\end{matrix}\right]_{4\times 1}$ is a column matrix of order $4\times 1$.

  • $D=\left[\begin{matrix} 2\\ 5\\ -3\\ 8\\ 7\end{matrix}\right]_{5\times 1}$ is a column matrix of order $5\times 1$.

All matrices of order $1\times 1$ are both row matrices and column matrices.

Square Matrix

A matrix is called a square matrix if it has same number of rows and columns. In other words a matrix $A=[a_{ij}]_{m\times n}$ is called a square matrix if $m=n$, i.e. number of rows and number of columns are equal.

Examples of Square Matrices

  • $A=\left[\begin{matrix}1\end{matrix}\right]$. Matrix $A$ is a square matrix of order $1$.
  • $B=\left[\begin{matrix} 1 & 3\\ 2 & 7\end{matrix}\right]$. Matrix $B$ is a square matrix of order $2$.
  • $C=\left[\begin{matrix} 1 & -7 & 2\\ 2 & 0 & 5\\ -1 & 8 & 3\end{matrix}\right]$. Matrix $C$ is a square matrix of order $3$.
  • $D=\left[\begin{matrix} 1 & -7 & 2 & 5\\ 2 & 0 & 5 & 3\\ -1 & 8 & 3 & 9\\ 2 & 8 & 4 & 2\end{matrix}\right]$. Matrix $D$ is a square matrix of order $4$.

Diagonal Matrix

A square matrix is called a diagonal matrix if all non diagonal elements are zero. In other words, a square matrix $A=[a_{ij}]_{n\times n}$ is called a diagonal matrix if $a_{ij}=0$ for all $i\ne j$, i.e. all non diagonal elements are zero.

Examples of Diagonal Matrices

  • $A=\left[\begin{matrix} 7 \end{matrix}\right]_{1\times 1}$ is a diagonal matrix of order $1\times 1$.

  • $B=\left[\begin{matrix} 3 & 0\\ 0 & 7\end{matrix}\right]_{2\times 2}$ is a diagonal matrix of order $2\times 2$.

  • $C=\left[\begin{matrix} 1 & 0 & 0\\ 0 & 0 & 0\\ 0 & 0 & 9\end{matrix}\right]_{3\times 3}$ is a diagonal matrix of order $3\times 3$.

  • $D=\left[\begin{matrix} 1 & 0 & 0 & 0\\ 0 & 5 & 0 & 0\\ 0 & 0 & 3 & 0\\ 0 & 0 & 0 & 2\end{matrix}\right]_{4\times 4}$ is a diagonal matrix of order $4\times 4$.

In a diagonal matrix diagonal entry/entries may be zero (see matrix $C$ defined above).

The matrix $E=\left[\begin{matrix} 1 & 0 & 5\\ 0 & 3 & 0\\ 0 & 0 & 9\end{matrix}\right]$ is not a diagonal matrix because it has a non-diagonal entry ($a_{13}=5$) which is non-zero.

Identity Matrix or Unit Matrix

A square matrix is called an identity matrix or unit matrix if all the diagonal entries are 1 (or unity) and all the non-diagonal entries are zero.

A diagonal matrix is called an identity matrix or unit matrix if all diagonal entries are 1 (or unity). Identity matrix is denoted by $I$.

Symbolically an $n\times n$ identity matrix can be define as

$$ \begin{equation*} I_n=[a_{ij}]_{n\times n}, \text{ where } a_{ij}=\begin{cases} 1& i= j;\\ 0& i\ne j. \end{cases} \end{equation*} $$

Examples of Identity Matrices

  • $I_1=\left[\begin{matrix}1\end{matrix}\right]$ is the $1\times 1$ identity matrix.

  • $I_2=\left[\begin{matrix} 1 & 0\\ 0 & 1\end{matrix}\right]$ is the $2\times 2$ identity matrix.

  • $I_3=\left[\begin{matrix} 1 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & 1\end{matrix}\right]$ is the $3\times 3$ identity matrix.

  • $I_4=\left[\begin{matrix} 1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0\\ 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1\end{matrix}\right]$ is the $4\times 4$ identity matrix.

Scalar Matrix

A diagonal matrix is called a scalar matrix if all diagonal entries are equal.

Examples of Scalar Matrices

  • $A=\left[\begin{matrix}3 & 0\\ 0 & 3\end{matrix}\right]_{2\times 2}$ is a scalar matrix of order $2\times 2$.

  • $B=\left[\begin{matrix} 7 & 0 & 0\\ 0 & 7 & 0\\ 0 & 0 & 7\end{matrix}\right]_{3\times 3}$ is a scalar matrix of order $3\times 3$,

Notice that

  • the matrix $C=\left[\begin{matrix} 5 & 0 & 0\\ 0 & 5 & 0\\ 2 & 0 & 5\end{matrix}\right]$ is not a scalar matrix because it contains a non zero non-diagonal entry.

  • The matrix $D=\left[\begin{matrix} 6 & 0 & 0\\ 0 & 6 & 0\\ 0 & 0 & 5\end{matrix}\right]$ is not a scalar matrix because all diagonal entry are not equal.

Upper Triangular Matrix

A square matrix $A=[a_{ij}]_{n\times n}$ is called an upper triangular matrix if $a_{ij}=0$ for all $i > j$, i.e. all the entries below the diagonal are zero. For example, matrices $A$ and $B$ defined below are upper triangular matrices.

$$ \begin{equation*} A=\left[ \begin{matrix} 1 & 2 & -7\\ 0 & 3 & 5\\ 0 & 0 & 9 \end{matrix} \right] \end{equation*} $$

$$ \begin{equation*} B=\left[ \begin{matrix} -2 & 0 & 1 & 4\\ 0 & 3 & 0 & 5\\ 0 & 0 & 0 & 4\\ 0 & 0 & 0 & 4 \end{matrix} \right] \end{equation*} $$
In an upper triangular matrix, entry/entries on or above the diagonal may be zero.

The matrix

$$ \begin{equation*} C=\left[\begin{matrix} 7 & 5 & 7 & 4\\ 0 & 1 & 2 & 7\\ 0 & 0 & 3 & 1\\ 0 & 8 & 0 & 9\end{matrix}\right] \end{equation*} $$

is not an upper triangular matrix because it contains a non zero entry below the diagonal namely 8.

Lower Triangular Matrix

A square matrix $A=[a_{ij}]_{n\times n}$ is called a lower triangular matrix if $a_{ij}=0$ for all $i < j$, i.e. all the entries above the diagonal are zero. For example, the matrices $A$ and $B$ defined below are lower triangular matrices.

$$ \begin{equation*} A=\left[ \begin{matrix} 7 & 0 & 0 & 0\\ 2 & 5 & 0 & 0\\ 4 & -9 & 5 & 0\\ 2 & 6 & 1 & 4 \end{matrix} \right] \end{equation*} $$

$$ \begin{equation*} B=\left[ \begin{matrix} 3 & 0 & 0 & 0\\ 0 & 5 & 0 & 0\\ 4 & 3 & 0 & 0\\ 2& 0 & 1 & 5 \end{matrix} \right] \end{equation*} $$

In a lower triangular matrix, entry/entries on or below the diagonal may be zero.

The matrix

$$ \begin{equation*} C=\left[ \begin{matrix} 6 & 0 & 0 & 0\\ 0 & 2 & 0 & 3\\ 3 & 9 & 0 & 0\\ 2 & 0 & 1 & 5 \end{matrix} \right] \end{equation*} $$

is not a lower triangular matrix because it contains a non zero entry above the diagonal namely 3.

Conclusion

Hope you like this tutorial on introduction to matrix algebra.

Leave a Comment