Matrices with Examples and Questions with Solutions

Examples and questions on matrices along with their detailed step‑by‑step solutions are presented below to help you master fundamental linear algebra concepts.

Definition of a Matrix

The following are examples of matrices (plural of matrix):

\[ \text{a)} \; \begin{bmatrix} -1 & 2 & 0 & 3 \\ 3 & -3 & 4 & -9 \end{bmatrix} \qquad \text{b)} \; \begin{bmatrix} -3 & 1 & 0 \\ 3 & -3 & 4 \\ 7 & -9 & 0 \end{bmatrix} \qquad \text{c)} \; \begin{bmatrix} -1 & 2 \\ 3 & 6 \\ 6 & -2 \end{bmatrix} \]

An m × n (read “m by n”) matrix is an arrangement of numbers (or algebraic expressions) in m rows and n columns. Each number in a given matrix is called an element or entry.

A zero matrix has all its elements equal to zero.

A matrix with only one row is called a row matrix. A matrix with only one column is called a column matrix.

Example 1

The following matrix has 3 rows and 6 columns:

\[ \begin{bmatrix} 4 & -2 & 1 & -6 & 0 & 1 \\ -2 & 5 & 7 & -2 & 0 & -7 \\ 1 & 7 & 8 & 0 & 5 & -2 \end{bmatrix} \]

The order (or dimensions or size) of a matrix indicates the number of rows and columns. In this example, the order is 3 × 6 (read “3 by 6”).

Matrix Entry (or Element)

The entry (or element) in row i and column j of a matrix \( A \) is denoted by \( (A)_{ij} \) or \( a_{ij} \).

Example 2

In the matrix \( A \) shown below, \( a_{11} = 5 \), \( a_{12} = 2 \), etc. Equivalently, \( (A)_{11} = 5 \), \( (A)_{12} = 2 \), etc.

\[ \textbf{A} = \begin{bmatrix} 5 & 2 & 7 & -3 \\ -9 & -2 & -7 & 11 \end{bmatrix} = \begin{bmatrix} a_{11} & a_{12} & a_{13} & a_{14} \\ a_{21} & a_{22} & a_{23} & a_{24} \end{bmatrix} \]

Square Matrix

A square matrix has the number of rows equal to the number of columns.

Example 3

For each matrix below, determine the order and state whether it is a square matrix.

\[ a) \begin{bmatrix} -1 & 1 & 0 & 3 \\ 4 & -3 & -7 & -9 \end{bmatrix} \;\;\;\; b) \begin{bmatrix} -6 & 2 & 0 \\ 3 & -3 & 4 \\ -5 & -11 & 9 \end{bmatrix} \;\;\;\; c) \begin{bmatrix} 1 & -2 & 5 & -2 \end{bmatrix} \;\;\;\; d) \begin{bmatrix} -2 & 0 \\ 0 & -3 \end{bmatrix} \;\;\;\; e) \begin{bmatrix} 3 \end{bmatrix} \]
View Solutions
  • a) Order: 2 × 4. Rows and columns are not equal, therefore not a square matrix.
  • b) Order: 3 × 3. Rows and columns are equal, therefore it is a square matrix.
  • c) Order: 1 × 4. Rows and columns are not equal, therefore not a square matrix. A matrix with one row is called a row matrix (or row vector).
  • d) Order: 2 × 2. Rows and columns are equal, therefore it is a square matrix.
  • e) Order: 1 × 1. Rows and columns are equal, therefore it is a square matrix.

Identity Matrix

An identity matrix \( I_n \) is an \( n \times n \) square matrix with all its elements in the main diagonal equal to 1 and all other elements equal to zero.

Example 4

The following are all identity matrices:

\[ I_1 = \begin{bmatrix} 1 \end{bmatrix} \quad , \quad I_2 = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} \quad , \quad I_3 = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} \]

Diagonal Matrix

A diagonal matrix is a square matrix with all its elements equal to zero except the elements in the main diagonal (from top left to bottom right).

\[ A = \begin{bmatrix} 6 & 0 & 0 \\ 0 & -2 & 0 \\ 0 & 0 & 2 \end{bmatrix} \]

Triangular Matrix

An upper triangular matrix is a square matrix with all elements below the main diagonal equal to zero.

A lower triangular matrix is a square matrix with all elements above the main diagonal equal to zero.

Matrix \( U \) below is an example of an upper triangular matrix. Matrix \( L \) is an example of a lower triangular matrix.

\[ U = \begin{bmatrix} 6 & 2 & -5 \\ 0 & -2 & 7 \\ 0 & 0 & 2 \end{bmatrix} \qquad L = \begin{bmatrix} 6 & 0 & 0 \\ -2 & -2 & 0 \\ 10 & 9 & 2 \end{bmatrix} \]

Transpose of a Matrix

The transpose of an \( m \times n \) matrix \( A \) is denoted \( A^T \) with order \( n \times m \) and defined by:

\[ (A^T)_{ij} = (A)_{ji} \]

Matrix \( A^T \) is obtained by exchanging the rows and columns of matrix \( A \).

Example 5

\[ \begin{bmatrix} 6 & 0 \\ -2 & -2 \\ 10 & 9 \end{bmatrix}^T = \begin{bmatrix} 6 & -2 & 10 \\ 0 & -2 & 9 \end{bmatrix} \]
\[ \begin{bmatrix} 3 & 0 & 0 \\ 0 & -2 & 0 \\ 0 & 0 & 6 \end{bmatrix}^T = \begin{bmatrix} 3 & 0 & 0 \\ 0 & -2 & 0 \\ 0 & 0 & 6 \end{bmatrix} \]

Symmetric Matrix

A square matrix is symmetric if its elements are such that \( A_{ij} = A_{ji} \). In other words, \( A \) is symmetric if \( A = A^T \).

Example 6

An example of a symmetric matrix:

\[ \begin{bmatrix} 4 & -2 & 1 \\ -2 & 5 & 7 \\ 1 & 7 & 8 \end{bmatrix} \]

Practice Questions on Matrices

Part A

Given the matrices:

\[ A = \begin{bmatrix} -1 & 23 & 10 \\ 0 & -2 & -11 \end{bmatrix} ,\quad B = \begin{bmatrix} -6 & 2 & 10 \\ 3 & -3 & 4 \\ -5 & -11 & 9 \\ 1 & -1 & 9 \end{bmatrix} ,\quad C = \begin{bmatrix} -3 & 2 & 9 & -5 & 7 \end{bmatrix} \] \[ D = \begin{bmatrix} -2 & 6 \\ -5 & 2 \end{bmatrix} ,\quad E = \begin{bmatrix} 3 \end{bmatrix} ,\quad F = \begin{bmatrix} 3 \\ 5 \\ -11 \\ 7 \end{bmatrix} ,\quad G = \begin{bmatrix} -6 & -4 & 23 \\ -4 & -3 & 4 \\ 23 & 4 & 9 \end{bmatrix} \]
  1. What is the dimension of each matrix?
  2. Which matrices are square?
  3. Which matrices are symmetric?
  4. Which matrix has the entry at row 3 and column 2 equal to −11?
  5. Which matrices have the entry at row 1 and column 3 equal to 10?
  6. Which are column matrices?
  7. Which are row matrices?
  8. Find \( A^T , C^T , E^T , G^T \).
View Solutions to Part A

a) A: 2 × 3, B: 4 × 3, C: 1 × 5, D: 2 × 2, E: 1 × 1, F: 4 × 1, G: 3 × 3

b) D, E, and G

c) E and G

d) B

e) A and B

f) E and F

g) E and C

h)

\[ A^T = \begin{bmatrix} -1 & 0 \\ 23 & -2 \\ 10 & -11 \end{bmatrix} ,\quad C^T = \begin{bmatrix} -3 \\ 2 \\ 9 \\ -5 \\ 7 \end{bmatrix} ,\quad E^T = \begin{bmatrix} 3 \end{bmatrix} ,\quad G^T = \begin{bmatrix} -6 & -4 & 23 \\ -4 & -3 & 4 \\ 23 & 4 & 9 \end{bmatrix} \]

Part B

Given the matrices:

\[ A = \begin{bmatrix} 23 & 10 \\ 0 & -11 \end{bmatrix} ,\quad B = \begin{bmatrix} -6 & 0 & 0 \\ -1 & -3 & 0 \\ -5 & 3 & -9 \end{bmatrix} ,\quad C = \begin{bmatrix} -3 & 0 \\ 0 & 2 \end{bmatrix} \] \[ D = \begin{bmatrix} -7 & 3 & 2 \\ 0 & 2 & 4 \\ 0 & 0 & 9 \end{bmatrix} ,\quad E = \begin{bmatrix} 12 & 0 & 0 \\ 0 & 23 & 0 \\ 0 & 0 & -19 \end{bmatrix} \]
  1. Which of the above matrices are diagonal?
  2. Which of the above matrices are lower triangular?
  3. Which of the above matrices are upper triangular?
View Solutions to Part B

a) C and E

b) B

c) A and D

More References and Links