Back to Course

Basic Matrices

Understanding Matrices

A matrix is a rectangular arrangement of numbers organized into rows and columns. Each number in the grid is called an element, and its position is identified by its row index and column index.
A matrix A of size m × n has m rows and n columns. Each element a_{ij} sits at row i, column j.
=Name of the matrix(—)
=Element in row i, column j(depends on context)
=Dimensions — rows first, then columns(count)
→
The matrix is square — equal rows and columns.
Row-Column Convention: Always state dimensions as rows first, then columns. A 3×2 matrix has 3 rows and 2 columns.
Element Addressing: means the element in row 2, column 3 — row comes first, column second.
Notation Alternatives: Matrices can also be written with parentheses ( ) instead of square brackets .
Matrices come in several important types, each with special properties that make them useful in different situations.
Row Matrix: A single row of numbers, e.g., — size 1×n.
Column Matrix: A single column of numbers, e.g., — size m×1.
Square Matrix: Equal rows and columns (n×n). Only square matrixes have determinants and inverse matrixes.
Zero Matrix: Every element is 0, denoted . Adding to any matrix leaves it unchanged.
Identity Matrix: Square matrix with 1s on the main diagonal and 0s everywhere else, denoted . Multiplying any compatible matrix by leaves it unchanged — the matrix equivalent of the number 1.

Quick Reference: Identity Matrices

•
•
•

Matrix Addition and Subtraction

Two matrices can be added or subtracted element by element, but only when they have the exact same dimensions.
Each element in the result is simply the sum or difference of the corresponding elements from the two matrices.
=Element at row i, column j of the result matrix C(depends on context)
=Corresponding elements from matrices A and B(depends on context)
Same Size Required: A 2×3 matrix can only be added to another 2×3 matrix. Adding a 2×2 to a 2×3 is undefined.
Element-by-Element: There is no cross-multiplication or interaction between elements — just direct addition or subtraction at matching positions.
Properties: Matrix addition is commutative () and associative ().

Scalar Multiplication

Multiplying a matrix by a scalar means multiplying every single element by that number. The resulting matrix has the same dimensions.
The scalar distributes to every element of the matrix, producing a new matrix of the same size.
=A scalar (real number)(real number)
=Any matrix(—)
Distributes to Every Element: Each becomes . The matrix size stays the same.
Negative Scalars: Multiplying by flips the sign of every element, giving the additive inverse .
Scalar Factor-Out: — a scalar distributes across matrix addition.

Matrix Multiplication

Matrix multiplication uses the dot product of rows and columns: multiply corresponding elements in a row of the first matrix with a column of the second, then sum them all up.
To find the element at row i, column j of the product, take row i from the first matrix and column j from the second, multiply matching pairs, and add all products.
=Element at row i, column j of the result(depends on context)
=Element in row i, column k of matrix A(depends on context)
=Element in row k, column j of matrix B(depends on context)
vs.
→
In general — matrix multiplication is NOT commutative.
Dimension Rule: If A is m×p and B is p×n, then AB is m×n. The inner dimensions must match (columns of A = rows of B).
Step-by-Step Method: For each element of the result, run your finger across a row of A and down a column of B, multiplying pairs and accumulating the total.
Zero Product Trap: does NOT mean or . Two non-zero matrices can multiply to give a zero matrix.
Matrix multiplication has properties that differ from regular number multiplication in important ways.
Not Commutative: in general. Always multiply in the given order.
Associative: — you can regroup multiplications.
Distributive: — multiplication distributes over addition.
Identity Property: — multiplying by the identity matrix leaves a matrix unchanged.

The Determinant

The determinant is a single number computed from a square matrix. For a 2×2 matrix, it measures the area scaling factor of the transformation the matrix represents.
Multiply the main diagonal elements and subtract the product of the off-diagonal elements.
=Main diagonal elements (top-left to bottom-right)(depends on context)
=Off-diagonal elements(depends on context)
=Determinant of matrix A(scalar)
→
The matrix is singular matrix — it has no inverse and the system may have no unique solution.
→
The matrix is non-singular — it has a unique inverse.
Visual Pattern: Cross-multiply: (down-right) minus (up-right) — draw an X through the matrix.
Determinant of Identity: for any size identity matrix.
Determinant of Zero Matrix: .
For a 3×3 matrix, the determinant is found by cofactor expansion along any row or column. Expanding along the first row is the most straightforward approach.
Expand along the first row: multiply each element by its cofactor (a signed 2×2 minor), then sum the results.
=Elements of the first row(depends on context)
=Minor — the 2×2 determinant remaining after removing the element's row and column(scalar)
A row or column is all zeros
→
automatically.
Two rows are identical
→
.
Sign Pattern: The signs alternate starting with for position (1,1): .
Minor Method: For each element, cross out its row and column, compute the 2×2 determinant of what remains, then apply the sign from the pattern.
Shortcut (Sarrus' Rule): Rewrite the first two columns to the right of the matrix, then sum the products of three downward diagonals minus three upward diagonals. Works only for 3×3.

Inverse of a 2×2 Matrix

The inverse matrix of A, written , is the matrix that satisfies . A matrix has an inverse only if its determinant is non-zero.
Swap the main diagonal elements, negate the off-diagonal elements, then divide every element by the determinant.
=The original 2×2 matrix(—)
=Determinant — must be non-zero(scalar)
=Inverse of A(—)
Swap and Negate: Swap and on the diagonal, then change the signs of and . This creates the adjugate matrix.
Division by Determinant: Every element of the adjugate gets divided by .
Verification Check: Multiply — you should get .
Non-Invertible Case: If , the inverse does not exist because of division by zero.

Solving Systems with Matrices

A system of linear equations can be written compactly in matrix form. For a 2×2 system, the solution uses the inverse matrix of the coefficient matrix.
Write the coefficients as matrix A, the variables as a column vector, and the constants as another column vector. The solution is found by multiplying the inverse of A with the constant vector.
=Coefficient matrix (from the variables' coefficients)(—)
=Column vector of unknowns(—)
=Column vector of constants (right-hand side)(—)
Setting Up the Matrix: For the system and , the coefficient matrix is , with and .
Unique Solution Condition: A unique solution exists if and only if .
No Solution or Infinite Solutions: If , the system either has no solution or infinitely many — there is no unique answer.