Matrices

LessonAbout 1.5 h2 of 3 in Advanced Engineering Mathematics

Matrices and Determinants

Key Ideas

  • Rectangular arrays of numbers classified by rows and columns
  • Determinants evaluate scalar values through minors and cofactors
  • Inversion and Cramer rule solve linear system equations

Matrix rectangular array of real numbers arranged in \(m\) rows and \(n\) columns enclosed in brackets.

Matrix Classifications and Types

  • Square Matrix: equal number of rows and columns
  • Row Matrix: matrix containing only one row
  • Column Matrix: matrix containing only one column
  • Diagonal Matrix: zero entries except along main diagonal
  • Identity Matrix: diagonal matrix with all diagonal entries equal to one
  • Upper Triangular Matrix: zero entries below main diagonal
  • Lower Triangular Matrix: zero entries above main diagonal

Identity Matrix Property

\[ A \cdot I = I \cdot A = A \]

Example. Given matrix \(A = \begin{bmatrix} 4 & 5 & 0 \\ 6 & 7 & 3 \\ 1 & 2 & 5 \end{bmatrix}\) and identity matrix \(B = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}\), calculate the matrix product \(AB\).

Solution. Multiplying any matrix \(A\) by an identity matrix \(I\) leaves matrix \(A\) unchanged:

\[ AB = \begin{bmatrix} 4 & 5 & 0 \\ 6 & 7 & 3 \\ 1 & 2 & 5 \end{bmatrix} \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} = \begin{bmatrix} 4 & 5 & 0 \\ 6 & 7 & 3 \\ 1 & 2 & 5 \end{bmatrix} \]

Answer: \(\begin{bmatrix} 4 & 5 & 0 \\ 6 & 7 & 3 \\ 1 & 2 & 5 \end{bmatrix}\)

Matrix Addition, Scalar Multiplication, and Transpose

  • Matrix Addition: adds corresponding elements of equal size matrices
  • Scalar Multiplication: multiplies every element by a constant scalar
  • Matrix Transpose: interchanges rows and columns of matrix

Matrix Transpose Definition

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

Example. Given \(A = \begin{bmatrix} 1 & 3 \\ -2 & 1 \end{bmatrix}\) and \(B = \begin{bmatrix} -1 & -2 \\ -1 & 1 \end{bmatrix}\), evaluate \(A + 2B\).

Solution. Multiply matrix \(B\) by scalar \(2\) and add corresponding elements to matrix \(A\):

\[ 2B = \begin{bmatrix} -2 & -4 \\ -2 & 2 \end{bmatrix} \]
\[ A + 2B = \begin{bmatrix} 1 + (-2) & 3 + (-4) \\ -2 + (-2) & 1 + 2 \end{bmatrix} = \begin{bmatrix} -1 & -1 \\ -4 & 3 \end{bmatrix} \]

Answer: \(\begin{bmatrix} -1 & -1 \\ -4 & 3 \end{bmatrix}\)

Example. Find the transpose \(A^T\) of matrix \(A = \begin{bmatrix} 3 & 1 & 2 \\ -2 & -1 & 0 \\ 0 & 2 & -1 \end{bmatrix}\).

Solution. Interchange rows and columns so row \(i\) becomes column \(i\):

\[ A^T = \begin{bmatrix} 3 & -2 & 0 \\ 1 & -1 & 2 \\ 2 & 0 & -1 \end{bmatrix} \]

Answer: \(\begin{bmatrix} 3 & -2 & 0 \\ 1 & -1 & 2 \\ 2 & 0 & -1 \end{bmatrix}\)

Matrix Multiplication and Division

  • Conformability Condition: columns of left matrix equal rows of right matrix
  • Product Dimension: \(m \times p\) times \(p \times n\) results in \(m \times n\)
  • Matrix Division: defined as \(A / B = A B^{-1}\)

Matrix Multiplication Formula

\[ (AB)_{ij} = \sum_{k=1}^p A_{ik} B_{kj} \]

Example. Find product \(BC\) for \(B = \begin{bmatrix} 1 & 2 \\ 0 & -5 \end{bmatrix}\) and \(C = \begin{bmatrix} 3 & 6 \\ 4 & 1 \end{bmatrix}\).

Solution. Compute dot products of rows of \(B\) with columns of \(C\):

\[ BC = \begin{bmatrix} 1(3)+2(4) & 1(6)+2(1) \\ 0(3)+(-5)(4) & 0(6)+(-5)(1) \end{bmatrix} = \begin{bmatrix} 11 & 8 \\ -20 & -5 \end{bmatrix} \]

Answer: \(\begin{bmatrix} 11 & 8 \\ -20 & -5 \end{bmatrix}\)

Example. Multiply matrix \(D = \begin{bmatrix} 2 & -3 \\ 4 & -1 \\ 1 & 5 \end{bmatrix}\) and matrix \(C = \begin{bmatrix} -4 & 1 & 3 \\ -1 & 2 & 5 \end{bmatrix}\).

Solution. \(D\) is \(3 \times 2\) and \(C\) is \(2 \times 3\), producing a \(3 \times 3\) product matrix \(DC\):

\[ DC = \begin{bmatrix} 2(-4)+(-3)(-1) & 2(1)+(-3)(2) & 2(3)+(-3)(5) \\ 4(-4)+(-1)(-1) & 4(1)+(-1)(2) & 4(3)+(-1)(5) \\ 1(-4)+5(-1) & 1(1)+5(2) & 1(3)+5(5) \end{bmatrix} = \begin{bmatrix} -5 & -4 & -9 \\ -15 & 2 & 7 \\ -9 & 11 & 28 \end{bmatrix} \]

Answer: \(\begin{bmatrix} -5 & -4 & -9 \\ -15 & 2 & 7 \\ -9 & 11 & 28 \end{bmatrix}\)

Determinants and Properties

  • Zero Determinant: row/column of zeros or identical rows/columns gives zero
  • Triangular Determinant: product of entries along principal diagonal
  • Row Interchange Sign: interchanging two rows or columns changes sign
  • Scalar Factor Rule: multiplying row/column by \(k\) multiplies determinant by \(k\)

2×2 Determinant Formula

\[ D = \begin{vmatrix} a & b \\ c & d \end{vmatrix} = ad - bc \]

3×3 Sarrus Rule Formula

\[ \begin{vmatrix} a & b & c \\ d & e & f \\ g & h & i \end{vmatrix} = (aei + bfg + cdh) - (gec + hfa + idb) \]

Example. Evaluate \(D = \begin{vmatrix} 1 & 5 & -2 \\ 2 & 1 & -3 \\ 3 & -2 & 1 \end{vmatrix}\).

Solution. Expand along first row:

\[ D = 1(1 - 6) - 5(2 - (-9)) + (-2)(-4 - 3) = 1(-5) - 5(11) - 2(-7) = -5 - 55 + 14 = -46 \]

Answer: \(-46\)

Example. Calculate \(D = \begin{vmatrix} 1 & 6 & 0 \\ 4 & 2 & 7 \\ 0 & 5 & 3 \end{vmatrix}\).

Solution. Expand along first row:

\[ D = 1(2(3) - 7(5)) - 6(4(3) - 7(0)) + 0 = 1(6 - 35) - 6(12) = -29 - 72 = -101 \]

Answer: \(-101\)

Minors, Cofactors, and Pivotal Element Method

  • Minor \(M_{ij}\): determinant of submatrix omitting row \(i\) and column \(j\)
  • Cofactor \(C_{ij}\): signed minor given by \((-1)^{i+j} M_{ij}\)
  • Pivotal Method: uses row/column operations to create zeros for higher-order matrices

Cofactor Formula

\[ C_{ij} = (-1)^{i+j} M_{ij} \]

Example. Find the minor and cofactor of entry \(5\) at row \(1\), column \(2\) in matrix \(A = \begin{bmatrix} 2 & 5 & 1 \\ 3 & 1 & 0 \\ 6 & 7 & 4 \end{bmatrix}\).

Solution. Omit row \(1\) and column \(2\) to find minor \(M_{12}\):

\[ M_{12} = \begin{vmatrix} 3 & 0 \\ 6 & 4 \end{vmatrix} = 3(4) - 6(0) = 12 \]

Apply sign \((-1)^{1+2} = -1\) for cofactor \(C_{12}\):

\[ C_{12} = (-1)^{1+2} M_{12} = -1(12) = -12 \]

Answer: \(\text{Minor} = 12, \text{Cofactor} = -12\)

Example. Compute \(x = \begin{vmatrix} 4 & -1 & 2 & 3 \\ 2 & 0 & 2 & 1 \\ 10 & 3 & 0 & 1 \\ 14 & 2 & 4 & 5 \end{vmatrix}\).

Solution. Use entry at row \(2\), column \(4\) (\(1\)) as pivot. Subtract \(2\) times column \(4\) from column \(1\), and subtract \(2\) times column \(4\) from column \(3\). This makes the first and third entries of row \(2\) zero:

\[ x = (-1)^{2+4} \begin{vmatrix} 4-2(3) & -1 & 2-2(3) \\ 10-2(1) & 3 & 0-2(1) \\ 14-2(5) & 2 & 4-2(5) \end{vmatrix} = \begin{vmatrix} -2 & -1 & -4 \\ 8 & 3 & -2 \\ 4 & 2 & -6 \end{vmatrix} \]

Evaluating this \(3 \times 3\) determinant yields \(x = -28\):

\[ x = -2\big(3(-6) - (-2)(2)\big) - (-1)\big(8(-6) - (-2)(4)\big) + (-4)\big(8(2) - 3(4)\big) = -2(-14) + 1(-40) - 4(4) = -28 \]

Answer: \(-28\)

Inverse Matrix and Classical Adjoint

  • Existence: matrix \(A\) has inverse if and only if \(\det A \neq 0\)
  • Singular Matrix: matrix with zero determinant, no inverse exists
  • Classical Adjoint: transpose of cofactor matrix, \(\text{adj } A = (\text{Cofactor Matrix})^T\)

2×2 Inverse Matrix Formula

\[ A^{-1} = \dfrac{1}{ad - bc} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix} \]

General Inverse Matrix Formula

\[ A^{-1} = \dfrac{\text{adj } A}{\det A} = \dfrac{(\text{Cofactor Matrix } A)^T}{\det A} \]

Example. Determine the inverse matrix of \(A = \begin{bmatrix} 1 & 2 \\ 5 & 9 \end{bmatrix}\).

Solution. Compute determinant \(\det A = 1(9) - 5(2) = -1\). Apply \(2 \times 2\) inverse formula:

\[ A^{-1} = \dfrac{1}{-1} \begin{bmatrix} 9 & -2 \\ -5 & 1 \end{bmatrix} = \begin{bmatrix} -9 & 2 \\ 5 & -1 \end{bmatrix} \]

Answer: \(\begin{bmatrix} -9 & 2 \\ 5 & -1 \end{bmatrix}\)

Example. Find the inverse of \(A = \begin{bmatrix} 1 & 2 & 0 \\ 2 & 1 & 4 \\ 4 & 2 & 6 \end{bmatrix}\).

Solution. Calculate determinant \(\det A = 6\). Compute cofactor matrix and transpose to get classical adjoint:

\[ \text{Cofactor Matrix} = \begin{bmatrix} -2 & 4 & 0 \\ -12 & 6 & 6 \\ 8 & -4 & -3 \end{bmatrix} \implies \text{adj } A = \begin{bmatrix} -2 & -12 & 8 \\ 4 & 6 & -4 \\ 0 & 6 & -3 \end{bmatrix} \]
\[ A^{-1} = \dfrac{1}{6} \begin{bmatrix} -2 & -12 & 8 \\ 4 & 6 & -4 \\ 0 & 6 & -3 \end{bmatrix} \]

Answer: \(\dfrac{1}{6} \begin{bmatrix} -2 & -12 & 8 \\ 4 & 6 & -4 \\ 0 & 6 & -3 \end{bmatrix}\)

Systems of Linear Equations and Cramer’s Rule

  • System Matrix Equation: \(A X = B \implies X = A^{-1} B\)
  • Cramer’s Rule: solves linear systems using determinant ratios
  • Determinant \(D_{x_i}\): formed by replacing column \(i\) of \(D\) with constant terms

Cramer’s Rule Formula

\[ x_i = \dfrac{D_{x_i}}{D} \]

Example. Solve for \(x\) and \(y\) from matrix equation \(\begin{bmatrix} 1 & 1 \\ 3 & 2 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} 2 \\ 0 \end{bmatrix}\).

Solution. Write as simultaneous linear equations \(x + y = 2\) and \(3x + 2y = 0\). Solve by substitution \(x = 2 - y\):

\[ 3(2 - y) + 2y = 0 \implies 6 - 3y + 2y = 0 \implies y = 6 \]
\[ x = 2 - 6 = -4 \]

Answer: \(x = -4, y = 6\)

Example. Solve for \(y\) using Cramer’s rule in \(x + y + z = 2\), \(3x - y - 2z = 4\), \(5x - 2y + 3z = -7\).

Solution. Compute coefficient determinant \(D\) and numerator determinant \(D_y\):

\[ D = \begin{vmatrix} 1 & 1 & 1 \\ 3 & -1 & -2 \\ 5 & -2 & 3 \end{vmatrix} = -27 \]
\[ D_y = \begin{vmatrix} 1 & 2 & 1 \\ 3 & 4 & -2 \\ 5 & -7 & 3 \end{vmatrix} = -81 \]
\[ y = \dfrac{D_y}{D} = \dfrac{-81}{-27} = 3 \]

Answer: \(y = 3\)