Lesson 3 · Properties of Matrix Multiplication

Types of Matrices

Optional MathematicsSubject
8 minEstimated read

Order of a Matrix and Its Elements

A matrix is a rectangular arrangement of numbers in rows and columns, written inside brackets. Rows run across and columns run down. A matrix with \( m \) rows and \( n \) columns has order \( m \times n \), read as "m by n". The number of rows is always said first.

Each number in a matrix is called an element. The element in row \( i \) and column \( j \) is written \( a_{ij} \). So \( a_{23} \) is the element in the second row and the third column. A whole matrix is often written in short as \( A = (a_{ij})_{m \times n} \). A 2 by 3 matrix looks like this in general form:

\[ A = \begin{pmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \end{pmatrix} \]

Matrices are sorted into types in two ways. Some types depend only on the SHAPE, that is, on the numbers of rows and columns. Other types depend on the PATTERN of the elements, such as where the zeros sit. Both kinds are taught below, shape first.

Row Matrix and Column Matrix

Definition

Row matrix: a matrix that has only one row. Its order is \( 1 \times n \), so every element \( a_{ij} \) has \( i = 1 \).

\[ A = \begin{pmatrix} 4 & -1 & 7 \end{pmatrix} \]

This matrix has one row and three columns, so it is a row matrix of order \( 1 \times 3 \). A list of a shopkeeper's sales on three days, written side by side, would form a row matrix like this.

Definition

Column matrix: a matrix that has only one column. Its order is \( m \times 1 \), so every element \( a_{ij} \) has \( j = 1 \).

\[ B = \begin{pmatrix} 5 \\ 0 \\ -3 \end{pmatrix} \]

Here there are three rows but only one column, so \( B \) is a column matrix of order \( 3 \times 1 \). Notice that \( A \) and \( B \) both hold three numbers, yet their shapes are different. The shape, not the count of numbers, decides the type.

Square Matrix and Rectangular Matrix

Definition

Square matrix: a matrix in which the number of rows is equal to the number of columns. A matrix of order \( m \times n \) is square when \( m = n \).

\[ P = \begin{pmatrix} 2 & -1 \\ 3 & 2 \end{pmatrix} \]

\[ S = \begin{pmatrix} -2 & 4 & 6 \\ 1 & 3 & -5 \\ 3 & 7 & -9 \end{pmatrix} \]

\( P \) has 2 rows and 2 columns, so it is a square matrix of order \( 2 \times 2 \). \( S \) has 3 rows and 3 columns, so it is a square matrix of order \( 3 \times 3 \). A square matrix is often called a square matrix of order 2 or order 3, giving the one number only.

Definition

Rectangular matrix: a matrix in which the number of rows is not equal to the number of columns, so \( m \neq n \).

Tables of data very often become rectangular matrices. The grade sheet below shows two students and three subjects.

Two students and three subjects: the grades form 2 rows and 3 columns, so the matrix made from them is rectangular.
Two students and three subjects: the grades form 2 rows and 3 columns, so the matrix made from them is rectangular.

\[ G = \begin{pmatrix} 3.2 & 3.6 & 3.6 \\ 3.6 & 3.2 & 2.8 \end{pmatrix} \]

The first row holds Kusum's grades and the second row holds Kapil's. \( G \) has order \( 2 \times 3 \). Since 2 is not equal to 3, it is a rectangular matrix. A matrix of order \( 4 \times 3 \) is rectangular too. So is every row matrix and every column matrix with more than one element, because one row and several columns can never be equal in number.

Zero or Null Matrix

Definition

Zero matrix (null matrix): a matrix in which every element is zero. It is denoted by \( O \).

\[ O = \begin{pmatrix} 0 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{pmatrix} \]

This is the zero matrix of order \( 3 \times 3 \). A zero matrix can have any order at all. The matrix \( \begin{pmatrix} 0 & 0 \end{pmatrix} \) is a zero matrix of order \( 1 \times 2 \), and it is also a row matrix. One matrix can belong to more than one type.

The Main Diagonal

The next types all belong to square matrices, and they all depend on one line of elements called the main diagonal. The main diagonal runs from the top left corner to the bottom right corner. Its elements are \( a_{11}, a_{22}, a_{33}, \ldots \), the elements whose row number and column number are the same.

In \( S \) above, the main diagonal is \( -2, 3, -9 \). An element above the main diagonal has its row number smaller than its column number, like \( a_{12} \). An element below it has its row number larger, like \( a_{31} \).

Diagonal, Scalar and Identity Matrices

Definition

Diagonal matrix: a square matrix in which the elements of the main diagonal are non-zero and all the elements outside the main diagonal are zero.

\[ D = \begin{pmatrix} 1 & 0 \\ 0 & 2 \end{pmatrix} \]

\[ E = \begin{pmatrix} a & 0 & 0 \\ 0 & b & 0 \\ 0 & 0 & c \end{pmatrix} \]

In both, only the main diagonal carries values and every other place is 0. The diagonal values may all be different, as 1 and 2 are in \( D \).

Definition

Scalar matrix: a diagonal matrix in which all the elements of the main diagonal are equal.

\[ K = \begin{pmatrix} 3 & 0 & 0 \\ 0 & 3 & 0 \\ 0 & 0 & 3 \end{pmatrix} \]

\( K \) is diagonal, and its diagonal elements are all 3, so it is a scalar matrix. The matrix \( D \) above is diagonal but not scalar, because its diagonal elements 1 and 2 are not equal.

Definition

Unit matrix (identity matrix): a scalar matrix in which every element of the main diagonal is 1. It is usually written \( I \).

\[ I_2 = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} \]

\[ I_3 = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix} \]

Key idea

These three types sit inside each other. Every identity matrix is a scalar matrix, every scalar matrix is a diagonal matrix, and every diagonal matrix is a square matrix. The reverse is not true: a diagonal matrix need not be scalar, and a scalar matrix need not be the identity.

Triangular Matrices

Definition

Upper triangular matrix: a square matrix in which all the elements below the main diagonal are zero.

\[ N = \begin{pmatrix} 1 & 2 & 3 \\ 0 & 2 & -1 \\ 0 & 0 & 4 \end{pmatrix} \]

The three places below the diagonal, \( a_{21}, a_{31}, a_{32} \), are all 0. The non-zero numbers fill a triangle in the upper right part, which gives the name.

Definition

Lower triangular matrix: a square matrix in which all the elements above the main diagonal are zero.

\[ Q = \begin{pmatrix} 1 & 0 & 0 \\ 2 & -1 & 0 \\ 3 & 2 & 4 \end{pmatrix} \]

Here \( a_{12}, a_{13}, a_{23} \) are 0, and the numbers fill the lower left triangle. A matrix that is either upper or lower triangular is called a triangular matrix.

Common mistake

Upper and lower refer to where the NUMBERS are, not where the zeros are. In an upper triangular matrix the zeros are below the diagonal and the numbers are above it.

Symmetric Matrix

Definition

Symmetric matrix: a square matrix that does not change when its rows and columns are interchanged. In general, \( A \) is symmetric if \( a_{ij} = a_{ji} \) for every \( i \) and \( j \).

\[ B = \begin{pmatrix} 5 & 2 & 3 \\ 2 & 4 & 8 \\ 3 & 8 & 1 \end{pmatrix} \]

Check it pair by pair. \( a_{12} = 2 \) and \( a_{21} = 2 \). \( a_{13} = 3 \) and \( a_{31} = 3 \). \( a_{23} = 8 \) and \( a_{32} = 8 \). Every element matches its partner on the other side of the main diagonal, as if the diagonal were a mirror. Write the first row as a column, the second row as a column, and so on, and you get \( B \) back again. The matrix \( \begin{pmatrix} x & y \\ y & z \end{pmatrix} \) is symmetric for the same reason. The diagonal elements themselves can be anything.

Equal Matrices

Definition

Equal matrices: two matrices are equal if and only if they have the same order and their corresponding elements are equal.

\[ \begin{pmatrix} a & b & c \\ d & e & f \end{pmatrix} = \begin{pmatrix} 1 & 2 & -3 \\ -2 & 4 & 7 \end{pmatrix} \]

Both matrices are of order \( 2 \times 3 \), so they can be equal. They are equal exactly when \( a = 1, b = 2, c = -3, d = -2, e = 4 \) and \( f = 7 \). Corresponding elements are the ones in the same row and the same column. This idea is the tool for finding unknowns: one matrix equation gives as many ordinary equations as there are elements.

Careful with order

Matrices of different orders are never equal, even if they hold the same numbers. The row matrix \( \begin{pmatrix} 1 & 2 \end{pmatrix} \) is not equal to the column matrix with elements 1 and 2.

Finding Unknowns by Equating Elements

Worked example (a): find \( a, b, c \) and \( d \) if the two matrices below are equal.

Step 1: The given equation is:

\[ \begin{pmatrix} a & 6 \\ -1 & b \end{pmatrix} = \begin{pmatrix} 2 & c \\ d & 9 \end{pmatrix} \]

Step 2: Both are \( 2 \times 2 \) matrices, so equal matrices give equal corresponding elements. Equating the first row, place by place:

\[ a = 2, \quad c = 6 \]

Step 3: Equating the second row, place by place:

\[ d = -1, \quad b = 9 \]

So \( a = 2, b = 9, c = 6 \) and \( d = -1 \). Notice that \( c \) sits in the right matrix, so it takes its value from the left one.

Worked example (b): find \( x \) and \( y \) if the two matrices below are equal.

Step 1: The given equation is:

\[ \begin{pmatrix} x + y & 4 \\ 0 & x - y \end{pmatrix} = \begin{pmatrix} 9 & 4 \\ 0 & 3 \end{pmatrix} \]

Step 2: Equating the corresponding elements that contain \( x \) and \( y \) gives two equations:

\[ x + y = 9 \quad \text{(i)} \]

\[ x - y = 3 \quad \text{(ii)} \]

Step 3: Adding (i) and (ii), because the \( y \) terms cancel:

\[ 2x = 12, \text{ so } x = 6 \]

Step 4: Putting \( x = 6 \) into equation (i):

\[ 6 + y = 9, \text{ so } y = 3 \]

Hence \( x = 6 \) and \( y = 3 \). Check in (ii): \( 6 - 3 = 3 \), which is correct. The elements 4 and 0 are the same on both sides, so they give no information.

Constructing a Matrix from a Rule

Sometimes a matrix is not written out. Instead its order is given together with a rule for \( a_{ij} \). To build it, put each row number \( i \) and column number \( j \) into the rule, one place at a time.

Worked example: construct \( A = (a_{ij})_{2 \times 3} \) where \( a_{ij} = i + 2j \).

Step 1: Writing the general form of a \( 2 \times 3 \) matrix:

\[ A = \begin{pmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \end{pmatrix} \]

Step 2: Using \( i = 1 \) for the first row:

\[ a_{11} = 1 + 2 = 3 \]

\[ a_{12} = 1 + 4 = 5 \]

\[ a_{13} = 1 + 6 = 7 \]

Step 3: Using \( i = 2 \) for the second row:

\[ a_{21} = 2 + 2 = 4 \]

\[ a_{22} = 2 + 4 = 6 \]

\[ a_{23} = 2 + 6 = 8 \]

Step 4: Placing each value in its position:

\[ A = \begin{pmatrix} 3 & 5 & 7 \\ 4 & 6 & 8 \end{pmatrix} \]

The same method works for a rule such as \( a_{ij} = (i \times j)^2 \). For a \( 2 \times 3 \) matrix that rule gives \( a_{11} = 1, a_{12} = 4, a_{13} = 9 \) and \( a_{21} = 4, a_{22} = 16, a_{23} = 36 \).

Unknowns in an Identity Matrix

When a matrix with unknowns is said to be an identity matrix, it is equal to \( I \) of the same order. So each diagonal element equals 1 and each other element equals 0.

Worked example: if the matrix below is an identity matrix, find \( x, y, p \) and \( q \).

Step 1: Writing it equal to the identity matrix of order 2:

\[ \begin{pmatrix} x + 3 & 2q - 6 \\ 4p + 8 & 2y \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} \]

Step 2: Equating the first diagonal element to 1:

\[ x + 3 = 1, \text{ so } x = -2 \]

Step 3: Equating the second diagonal element to 1:

\[ 2y = 1, \text{ so } y = \tfrac{1}{2} \]

Step 4: Equating the element in row 1, column 2 to 0:

\[ 2q - 6 = 0, \text{ so } q = 3 \]

Step 5: Equating the element in row 2, column 1 to 0:

\[ 4p + 8 = 0, \text{ so } p = -2 \]

Hence \( x = -2, y = \tfrac{1}{2}, p = -2 \) and \( q = 3 \).

Types of Matrices at a Glance

TypeWhat decides itSmall example
RowOnly one row\( \begin{pmatrix} 4 & -1 & 7 \end{pmatrix} \)
ColumnOnly one column\( \begin{pmatrix} 5 \\ 0 \end{pmatrix} \)
SquareRows equal columns\( \begin{pmatrix} 2 & -1 \\ 3 & 2 \end{pmatrix} \)
RectangularRows not equal to columns\( \begin{pmatrix} 1 & 2 & 3 \\ 0 & 4 & 5 \end{pmatrix} \)
ZeroEvery element is 0\( \begin{pmatrix} 0 & 0 \\ 0 & 0 \end{pmatrix} \)
DiagonalNon-zero only on the main diagonal\( \begin{pmatrix} 1 & 0 \\ 0 & 2 \end{pmatrix} \)
ScalarDiagonal with equal diagonal elements\( \begin{pmatrix} 3 & 0 \\ 0 & 3 \end{pmatrix} \)
IdentityDiagonal elements all 1\( \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} \)
Upper triangularZeros below the main diagonal\( \begin{pmatrix} 1 & 2 \\ 0 & 3 \end{pmatrix} \)
Lower triangularZeros above the main diagonal\( \begin{pmatrix} 1 & 0 \\ 2 & 3 \end{pmatrix} \)
Symmetric\( a_{ij} = a_{ji} \)\( \begin{pmatrix} x & y \\ y & z \end{pmatrix} \)
🔐

The full lesson is waiting for you

The notes are free to read in full. A free account opens the rest of the practice, and tracks your progress and confidence score for every subject. Presentations and videos need approval from Learn Yeti.