Introduction to matrices
Digital Handwritten Lesson
1. Introduction to Matrix
Consider a classroom. Students sit in rows and columns. We represent each seat symbolically using numbers 1, 2, 3, 4, … (written as heads).
- Numbers are arranged horizontally and vertically.
- In Side 'A': students {1, 2}, {8, 7}, {9, 10} are sitting horizontally.
- In Side 'B': students {3, 4}, {6, 5}, {11, 12} are sitting horizontally.
- In Side 'A': students {1, 8, 9} and {2, 7, 10} are sitting vertically.
- In Side 'B': students {3, 6, 11} and {4, 5, 12} are sitting vertically.
- If we see horizontally, there are 6 horizontal rows.
- If we see vertically, there are 4 vertical columns.
- Those students sitting horizontally are sitting in rows.
- Those students sitting vertically are sitting in columns.
- The arrangement of numbers in rows and columns is actually a Matrix.
Real life examples of matrix: sitting arrangement in class, calendar on wall, grade sheet.
- → Horizontal arrangement = Rows
- → Vertical arrangement = Columns
Let us consider a set of numbers — marks obtained by 24 students in Opt-Maths out of 25 full marks:
10, 7, 6, 16, 18, 20, 11, 9, 5, 22, 23, 10
Question: How many different arrangements can be made?
Let us consider the (6, 4) arrangement:
| 12 | 9 | 15 | 24 |
| 20 | 18 | 16 | 17 |
| 8 | 11 | 15 | 12 |
| 10 | 7 | 6 | 16 |
| 18 | 20 | 11 | 9 |
| 5 | 22 | 23 | 10 |
- Numbers are arranged in 6 horizontal rows and 4 vertical columns.
- The numbers are enclosed inside brackets [ ].
Such an arrangement of numbers in rows and columns enclosed by brackets is called a Matrix.
The arrangement of numbers (or objects, alphabets, symbols, etc.) in rows and columns, enclosed by ( ) or [ ], is called a MATRIX.
- Matrices are denoted by capital letters: \(A, B, C, \ldots, X, Y, Z\).
- Members of a matrix can be numbers, objects, alphabets, symbols, etc.
2. Order of a Matrix
Let us consider these two matrices:
$$A = \begin{bmatrix} 3 & 4 & 5 \\ 6 & 7 & 8 \end{bmatrix}, \quad B = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}$$- Matrix \(A\) has 2 rows and 3 columns.
- Matrix \(B\) has 2 rows and 2 columns.
Rows and columns of a matrix form its order.
The order of any matrix is the number of rows and the number of columns, written as:
$$\text{Order} = \text{no. of rows} \times \text{no. of columns}$$3. Entries (Elements) of a Matrix
Let us consider a \(2 \times 3\) matrix:
$$A = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{bmatrix}$$Questions:
So, \(a_{11},\; a_{12},\; a_{13},\; a_{21},\; a_{22},\; a_{23}\), … are called the entries of a matrix, which gives the location of each element in a matrix.
In general, a matrix \(A\) is written as:
$$A = [a_{ij}]$$where \(i\) = row number and \(j\) = column number.
If the matrix is denoted by \(P\), then its entries are:
In matrix form:
$$P = \begin{bmatrix} p_{11} & p_{12} \\ p_{21} & p_{22} \\ p_{31} & p_{32} \end{bmatrix}_{3 \times 2}$$4. Types of Matrices
Consider the following matrices and count their rows:
$$A = \begin{bmatrix} 1 & 2 & 3 \end{bmatrix}, \quad B = \begin{bmatrix} 5 & -2 & 0 & 7 \end{bmatrix}$$Each of these matrices has only one row.
A matrix that has only one row is a Row Matrix.
A matrix having only one row is called a Row Matrix. Its order is \(1 \times n\).
Example: \(A = \begin{bmatrix} 3 & -1 & 5 \end{bmatrix}\) is a \(1 \times 3\) row matrix.
Consider the following matrices and count their columns:
$$A = \begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix}, \quad B = \begin{bmatrix} 4 \\ -7 \end{bmatrix}$$Each of these matrices has only one column.
A matrix that has only one column is a Column Matrix.
A matrix having only one column is called a Column Matrix. Its order is \(m \times 1\).
Example: \(B = \begin{bmatrix} 2 \\ 5 \\ -3 \end{bmatrix}\) is a \(3 \times 1\) column matrix.
Consider the following matrices and look at their elements:
$$A = \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix}, \quad B = \begin{bmatrix} 0 & 0 & 0 \end{bmatrix}$$All elements (entries) in each matrix are zero.
A matrix whose all elements are zero is a Null or Zero Matrix.
A matrix in which all elements are zero is called a Null Matrix or Zero Matrix. It is denoted by \(O\).
Example: \(O = \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix}\)
Consider the following matrices and compare their number of rows and columns:
$$A = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{bmatrix}, \quad B = \begin{bmatrix} 7 & 8 \\ 9 & 10 \\ 11 & 12 \end{bmatrix}$$- Matrix \(A\) has 2 rows and 3 columns → \(2 \neq 3\).
- Matrix \(B\) has 3 rows and 2 columns → \(3 \neq 2\).
In both cases, the number of rows is not equal to the number of columns.
A matrix where the number of rows \(\neq\) number of columns is a Rectangular Matrix.
A matrix in which the number of rows is not equal to the number of columns \((m \neq n)\) is called a Rectangular Matrix.
Consider the following matrices and compare their rows and columns:
$$A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}, \quad B = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{bmatrix}$$- Matrix \(A\): 2 rows, 2 columns → \(2 = 2\).
- Matrix \(B\): 3 rows, 3 columns → \(3 = 3\).
In both cases, the number of rows equals the number of columns.
A matrix where the number of rows equals the number of columns is a Square Matrix.
A matrix in which the number of rows is equal to the number of columns \((m = n)\) is called a Square Matrix of order \(n\).
Example: \(\begin{bmatrix} 5 & 6 \\ 7 & 8 \end{bmatrix}\) is a square matrix of order 2.
Before studying the remaining types of matrices, it is important to understand the two diagonals of a square matrix, as they are referred to frequently.
The diagonal running from the top-left to the bottom-right of a square matrix is called the Principal Diagonal (also called main diagonal or leading diagonal). These are the elements where row number = column number, i.e., \(a_{ij}\) where \(i = j\).
Elements: \(a_{11},\; a_{22},\; a_{33}\) (where \(i = j\))
The diagonal running from the top-right to the bottom-left of a square matrix is called the Secondary Diagonal (also called anti-diagonal or counter-diagonal). These are the elements where \(i + j = n + 1\) (for an \(n \times n\) matrix).
Elements: \(a_{13},\; a_{22},\; a_{31}\) (where \(i + j = n + 1\))
Consider the following square matrices and observe their non-diagonal elements:
$$A = \begin{bmatrix} 3 & 0 \\ 0 & 5 \end{bmatrix}, \quad B = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 4 & 0 \\ 0 & 0 & 7 \end{bmatrix}$$All elements except the diagonal elements (i.e., elements where \(i = j\)) are zero.
A square matrix in which all non-diagonal elements are zero is a Diagonal Matrix.
A square matrix in which all the elements except the principal diagonal elements are zero is called a Diagonal Matrix.
That is, \(a_{ij} = 0\) for all \(i \neq j\).
Consider the following diagonal matrices and observe the diagonal elements:
$$A = \begin{bmatrix} 4 & 0 \\ 0 & 4 \end{bmatrix}, \quad B = \begin{bmatrix} 3 & 0 & 0 \\ 0 & 3 & 0 \\ 0 & 0 & 3 \end{bmatrix}$$All diagonal elements are equal to each other (and non-diagonal elements are zero).
A diagonal matrix in which all diagonal elements are equal (same constant) is a Scalar Matrix.
A diagonal matrix in which all the diagonal elements are equal \((a_{ii} = k \text{ for all } i)\) is called a Scalar Matrix.
Consider the following scalar matrices and observe the value of the diagonal elements:
$$I_2 = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}, \quad I_3 = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}$$All diagonal elements are 1 and all non-diagonal elements are 0.
A scalar matrix where every diagonal element equals 1 is an Identity (Unit) Matrix.
A square matrix in which all diagonal elements are 1 and all other elements are 0 is called an Identity Matrix or Unit Matrix, denoted by \(I\).
That is, \(a_{ij} = 1\) if \(i = j\), and \(a_{ij} = 0\) if \(i \neq j\).
Consider the following square matrices and observe the position of zero and non-zero elements:
$$U = \begin{bmatrix} 2 & 3 & 5 \\ 0 & 4 & 6 \\ 0 & 0 & 1 \end{bmatrix}, \quad L = \begin{bmatrix} 2 & 0 & 0 \\ 3 & 4 & 0 \\ 5 & 6 & 1 \end{bmatrix}$$- In matrix \(U\), all elements below the principal diagonal are zero.
- In matrix \(L\), all elements above the principal diagonal are zero.
- A square matrix with all zeros below the diagonal is an Upper Triangular Matrix.
- A square matrix with all zeros above the diagonal is a Lower Triangular Matrix.
A square matrix is called an Upper Triangular Matrix if all elements below the principal diagonal are zero (\(a_{ij} = 0\) for \(i > j\)).
A square matrix is called a Lower Triangular Matrix if all elements above the principal diagonal are zero (\(a_{ij} = 0\) for \(i < j\)).
Course material curated by Mr. Nripendraswar Acharya