Matrices come in many shapes and patterns, and several of them have special names because they behave in special ways. The identity matrix plays the part of the number 1 1 1 , the zero matrix the part of 0 0 0 , and square matrices are the ones that will have determinants and inverses later in the course. This lesson introduces each type with an example, and then explains when two matrices are equal.
Row and column matrices#
A row matrix has exactly one row; its order is 1 × n 1 \times n 1 × n .
[ 3 − 1 0 7 ] is a 1 × 4 row matrix. \begin{bmatrix} 3 & -1 & 0 & 7 \end{bmatrix} \text{ is a } 1 \times 4 \text{ row matrix.} [ 3 − 1 0 7 ] is a 1 × 4 row matrix.
A column matrix has exactly one column; its order is m × 1 m \times 1 m × 1 .
[ 2 5 − 4 ] is a 3 × 1 column matrix. \begin{bmatrix} 2 \\ 5 \\ -4 \end{bmatrix} \text{ is a } 3 \times 1 \text{ column matrix.} 2 5 − 4 is a 3 × 1 column matrix.
Square and rectangular matrices#
A square matrix has the same number of rows and columns. A square matrix of order n × n n \times n n × n is often called simply a matrix of order n n n .
A matrix that is not square is called rectangular .
In a square matrix, the entries a 11 , a 22 , a 33 , … a_{11}, a_{22}, a_{33}, \ldots a 11 , a 22 , a 33 , … (where the row number equals the column number) form the principal diagonal (or leading diagonal), running from top left to bottom right. The sum of the entries on the principal diagonal is called the trace of the matrix.
Example 1#
Find the trace of A = [ 2 5 1 0 − 3 4 7 8 6 ] A = \begin{bmatrix} 2 & 5 & 1 \\ 0 & -3 & 4 \\ 7 & 8 & 6 \end{bmatrix} A = 2 0 7 5 − 3 8 1 4 6 .
The principal diagonal is 2 2 2 , − 3 -3 − 3 , 6 6 6 . So the trace is 2 + ( − 3 ) + 6 = 5 2 + (-3) + 6 = 5 2 + ( − 3 ) + 6 = 5 .
Zero matrix#
A matrix in which every entry is 0 0 0 is called a zero matrix or null matrix , written O O O . It can be of any order:
[ 0 0 0 0 ] , [ 0 0 0 ] \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix}, \qquad \begin{bmatrix} 0 & 0 & 0 \end{bmatrix} [ 0 0 0 0 ] , [ 0 0 0 ]
Diagonal, scalar and identity matrices#
A square matrix in which every entry off the principal diagonal is 0 0 0 is called a diagonal matrix . The diagonal entries themselves may be anything, including 0 0 0 .
[ 4 0 0 0 − 1 0 0 0 9 ] is a diagonal matrix. \begin{bmatrix} 4 & 0 & 0 \\ 0 & -1 & 0 \\ 0 & 0 & 9 \end{bmatrix} \text{ is a diagonal matrix.} 4 0 0 0 − 1 0 0 0 9 is a diagonal matrix.
A diagonal matrix whose diagonal entries are all equal is called a scalar matrix .
[ 5 0 0 5 ] is a scalar matrix. \begin{bmatrix} 5 & 0 \\ 0 & 5 \end{bmatrix} \text{ is a scalar matrix.} [ 5 0 0 5 ] is a scalar matrix.
A scalar matrix whose diagonal entries are all 1 1 1 is called an identity matrix (or unit matrix), written I I I , or I n I_n I n for order n n n .
I 2 = [ 1 0 0 1 ] , I 3 = [ 1 0 0 0 1 0 0 0 1 ] I_2 = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}, \qquad I_3 = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} I 2 = [ 1 0 0 1 ] , I 3 = 1 0 0 0 1 0 0 0 1
Each type is a special case of the one before: every identity matrix is a scalar matrix, and every scalar matrix is a diagonal matrix.
Triangular matrices#
A square matrix is upper triangular if every entry below the principal diagonal is 0 0 0 , and lower triangular if every entry above it is 0 0 0 .
[ 1 4 − 2 0 3 6 0 0 5 ] is upper triangular; [ 2 0 0 7 − 1 0 3 8 4 ] is lower triangular. \begin{bmatrix} 1 & 4 & -2 \\ 0 & 3 & 6 \\ 0 & 0 & 5 \end{bmatrix} \text{ is upper triangular;} \qquad \begin{bmatrix} 2 & 0 & 0 \\ 7 & -1 & 0 \\ 3 & 8 & 4 \end{bmatrix} \text{ is lower triangular.} 1 0 0 4 3 0 − 2 6 5 is upper triangular; 2 7 3 0 − 1 8 0 0 4 is lower triangular.
A diagonal matrix is both upper and lower triangular.
Example 2#
Name the type of each matrix.
(a) [ 0 0 0 0 0 0 ] \begin{bmatrix} 0 & 0 \\ 0 & 0 \\ 0 & 0 \end{bmatrix} 0 0 0 0 0 0 (b) [ − 3 0 0 − 3 ] \begin{bmatrix} -3 & 0 \\ 0 & -3 \end{bmatrix} [ − 3 0 0 − 3 ] (c) [ 1 0 6 2 ] \begin{bmatrix} 1 & 0 \\ 6 & 2 \end{bmatrix} [ 1 6 0 2 ] (d) [ 8 1 ] \begin{bmatrix} 8 \\ 1 \end{bmatrix} [ 8 1 ]
(a) A zero matrix of order 3 × 2 3 \times 2 3 × 2 (also rectangular).
(b) A scalar matrix (also diagonal, square, and both upper and lower triangular).
(c) A lower triangular matrix: the only entry above the diagonal is 0 0 0 .
(d) A column matrix of order 2 × 1 2 \times 1 2 × 1 .
Equality of matrices#
Two matrices A A A and B B B are equal , written A = B A = B A = B , when
they have the same order , and
every entry of A A A equals the entry in the same place in B B B : a i j = b i j a_{ij} = b_{ij} a ij = b ij for all i i i and j j j .
So [ 1 2 ] \begin{bmatrix} 1 & 2 \end{bmatrix} [ 1 2 ] and [ 1 2 ] \begin{bmatrix} 1 \\ 2 \end{bmatrix} [ 1 2 ] are not equal: they hold the same numbers but have different orders.
One matrix equation is really a set of ordinary equations, one for each position. This is very useful for finding unknowns.
Example 3#
Find x x x and y y y if [ x + y 2 5 x − y ] = [ 6 2 5 2 ] \begin{bmatrix} x + y & 2 \\ 5 & x - y \end{bmatrix} = \begin{bmatrix} 6 & 2 \\ 5 & 2 \end{bmatrix} [ x + y 5 2 x − y ] = [ 6 5 2 2 ] .
Equate the entries in the same places: x + y = 6 x + y = 6 x + y = 6 and x − y = 2 x - y = 2 x − y = 2 . Adding, 2 x = 8 2x = 8 2 x = 8 , so x = 4 x = 4 x = 4 ; then y = 2 y = 2 y = 2 .
Example 4#
Find a a a , b b b , c c c , d d d if [ 2 a + b a − 2 b 5 c − d 4 c + 3 d ] = [ 4 − 3 11 24 ] \begin{bmatrix} 2a + b & a - 2b \\ 5c - d & 4c + 3d \end{bmatrix} = \begin{bmatrix} 4 & -3 \\ 11 & 24 \end{bmatrix} [ 2 a + b 5 c − d a − 2 b 4 c + 3 d ] = [ 4 11 − 3 24 ] .
From the first row: 2 a + b = 4 2a + b = 4 2 a + b = 4 and a − 2 b = − 3 a - 2b = -3 a − 2 b = − 3 . Multiply the first by 2 2 2 and add: 5 a = 5 5a = 5 5 a = 5 , so a = 1 a = 1 a = 1 , and then b = 4 − 2 = 2 b = 4 - 2 = 2 b = 4 − 2 = 2 .
From the second row: 5 c − d = 11 5c - d = 11 5 c − d = 11 , so d = 5 c − 11 d = 5c - 11 d = 5 c − 11 . Substitute into 4 c + 3 d = 24 4c + 3d = 24 4 c + 3 d = 24 :
4 c + 15 c − 33 = 24 ⟹ 19 c = 57 ⟹ c = 3 4c + 15c - 33 = 24 \implies 19c = 57 \implies c = 3 4 c + 15 c − 33 = 24 ⟹ 19 c = 57 ⟹ c = 3
Then d = 15 − 11 = 4 d = 15 - 11 = 4 d = 15 − 11 = 4 . So a = 1 a = 1 a = 1 , b = 2 b = 2 b = 2 , c = 3 c = 3 c = 3 , d = 4 d = 4 d = 4 .
Practice#
Write a row matrix of order 1 × 3 1 \times 3 1 × 3 and a column matrix of order 2 × 1 2 \times 1 2 × 1 .
Find the trace of [ 7 2 − 4 9 ] \begin{bmatrix} 7 & 2 \\ -4 & 9 \end{bmatrix} [ 7 − 4 2 9 ] .
Find the trace of [ 1 0 3 5 − 6 2 4 8 10 ] \begin{bmatrix} 1 & 0 & 3 \\ 5 & -6 & 2 \\ 4 & 8 & 10 \end{bmatrix} 1 5 4 0 − 6 8 3 2 10 .
Name the type of [ 3 0 0 0 3 0 0 0 3 ] \begin{bmatrix} 3 & 0 & 0 \\ 0 & 3 & 0 \\ 0 & 0 & 3 \end{bmatrix} 3 0 0 0 3 0 0 0 3 as precisely as you can.
Name the type of [ 2 5 0 − 1 ] \begin{bmatrix} 2 & 5 \\ 0 & -1 \end{bmatrix} [ 2 0 5 − 1 ] .
Is every diagonal matrix a scalar matrix? Give a reason.
Write the identity matrix of order 4 4 4 .
Are [ 3 0 ] \begin{bmatrix} 3 & 0 \end{bmatrix} [ 3 0 ] and [ 3 0 0 ] \begin{bmatrix} 3 & 0 & 0 \end{bmatrix} [ 3 0 0 ] equal? Give a reason.
Find x x x and y y y if [ 2 x 3 1 y + 4 ] = [ 10 3 1 1 ] \begin{bmatrix} 2x & 3 \\ 1 & y + 4 \end{bmatrix} = \begin{bmatrix} 10 & 3 \\ 1 & 1 \end{bmatrix} [ 2 x 1 3 y + 4 ] = [ 10 1 3 1 ] .
Find p p p and q q q if [ p + q p − q ] = [ 9 1 ] \begin{bmatrix} p + q \\ p - q \end{bmatrix} = \begin{bmatrix} 9 \\ 1 \end{bmatrix} [ p + q p − q ] = [ 9 1 ] .
Find a a a , b b b , c c c if [ a b + 1 2 c 6 ] \begin{bmatrix} a & b + 1 \\ 2c & 6 \end{bmatrix} [ a 2 c b + 1 6 ] is a scalar matrix.
Answers#
Show answers
For example [ 4 − 2 1 ] \begin{bmatrix} 4 & -2 & 1 \end{bmatrix} [ 4 − 2 1 ] and [ 3 0 ] \begin{bmatrix} 3 \\ 0 \end{bmatrix} [ 3 0 ] .
7 + 9 = 16 7 + 9 = 16 7 + 9 = 16 .
1 + ( − 6 ) + 10 = 5 1 + (-6) + 10 = 5 1 + ( − 6 ) + 10 = 5 .
A scalar matrix (it is also diagonal, square and triangular), equal to 3 I 3 3I_3 3 I 3 .
An upper triangular matrix.
No. A scalar matrix needs all diagonal entries equal; [ 1 0 0 2 ] \begin{bmatrix} 1 & 0 \\ 0 & 2 \end{bmatrix} [ 1 0 0 2 ] is diagonal but not scalar.
The 4 × 4 4 \times 4 4 × 4 matrix with 1 1 1 in each diagonal place and 0 0 0 everywhere else.
No. Their orders, 1 × 2 1 \times 2 1 × 2 and 1 × 3 1 \times 3 1 × 3 , are different.
2 x = 10 2x = 10 2 x = 10 gives x = 5 x = 5 x = 5 ; y + 4 = 1 y + 4 = 1 y + 4 = 1 gives y = − 3 y = -3 y = − 3 .
p + q = 9 p + q = 9 p + q = 9 and p − q = 1 p - q = 1 p − q = 1 , so p = 5 p = 5 p = 5 , q = 4 q = 4 q = 4 .
Off-diagonal entries must be 0 0 0 : b + 1 = 0 b + 1 = 0 b + 1 = 0 and 2 c = 0 2c = 0 2 c = 0 , so b = − 1 b = -1 b = − 1 , c = 0 c = 0 c = 0 . Diagonal entries must be equal: a = 6 a = 6 a = 6 .