Matrices & Determinants Intro

10 min
Video + Practice
SC-34

Target Objective

Perform matrix operations and calculate 2x2 determinants

Matrices & Determinants Intro

A matrix is a rectangular array of numbers arranged in rows and columns. Matrices are powerful tools used in solving systems of equations, computer graphics, data science, and engineering. This lesson introduces basic matrix operations and determinants.

Matrix Basics

A matrix with m rows and n columns is called an m x n matrix.

Example of a 2x3 matrix: A = [[1, 2, 3], [4, 5, 6]]

Special matrices:

  • Row matrix: 1 x n (single row)
  • Column matrix: m x 1 (single column)
  • Square matrix: m = n (same number of rows and columns)
  • Identity matrix (I): Square matrix with 1s on the diagonal and 0s elsewhere
  • Zero matrix: All elements are 0

Matrix Operations

Addition/Subtraction: Add or subtract corresponding elements (matrices must be the same size).

If A = [[1, 2], [3, 4]] and B = [[5, 6], [7, 8]], then:

A + B = [[1+5, 2+6], [3+7, 4+8]] = [[6, 8], [10, 12]]

Scalar Multiplication: Multiply every element by the scalar.

2A = [[2, 4], [6, 8]]

Matrix Multiplication: For A (m x n) and B (n x p), the product AB is (m x p). Multiply rows of A by columns of B.

Worked Example: Matrix Multiplication

A = [[1, 2], [3, 4]] and B = [[5, 6], [7, 8]]. Find AB.

Solution:

  • AB[1,1] = 1(5) + 2(7) = 5 + 14 = 19
  • AB[1,2] = 1(6) + 2(8) = 6 + 16 = 22
  • AB[2,1] = 3(5) + 4(7) = 15 + 28 = 43
  • AB[2,2] = 3(6) + 4(8) = 18 + 32 = 50

AB = [[19, 22], [43, 50]]

Note: In general, AB is not equal to BA (matrix multiplication is not commutative).

Determinants (2x2)

For a 2x2 matrix A = [[a, b], [c, d]]:

det(A) = |A| = ad - bc

Worked Example: Find the determinant of A = [[3, 2], [1, 5]].

det(A) = 3(5) - 2(1) = 15 - 2 = 13

Inverse of a 2x2 Matrix

A matrix has an inverse only if its determinant is non-zero.

A⁻¹ = (1/det(A)) x [[d, -b], [-c, a]]

Worked Example: Find the inverse of A = [[3, 2], [1, 5]].

Solution:

  • det(A) = 13 (from above)
  • A⁻¹ = (1/13) x [[5, -2], [-1, 3]]
  • A⁻¹ = [[5/13, -2/13], [-1/13, 3/13]]

Verify: A x A⁻¹ = I (identity matrix)

Applications

  • Solving systems of linear equations (AX = B, so X = A⁻¹B)
  • Computer graphics (transformations like rotation, scaling)
  • Data analysis and machine learning

Key Takeaways

  • Matrices are arrays of numbers with defined operations
  • Matrix multiplication requires matching inner dimensions and is not commutative
  • det([[a,b],[c,d]]) = ad - bc
  • A matrix is invertible only if its determinant is non-zero

Quick Quiz

1. The determinant of [[4, 3], [2, 1]] is:

2. If A is a 2x3 matrix and B is a 3x4 matrix, then AB is a:

3. A matrix whose determinant is zero is called: