Linear Algebra guide
Matrices and Linear Algebra Basics
Learn matrix dimensions, addition, multiplication, determinants, and the conditions required for an inverse.
10 min readIntermediateUpdated 2026-07-12
What you will learn
- Check matrix dimension compatibility
- Multiply rows by columns
- Interpret determinants and inverses
Concept 1
Dimensions control valid operations
Matrices can be added only when their dimensions match. The product AB is defined when the number of columns of A equals the number of rows of B.
Concept 2
Matrix multiplication uses row-column dot products
Each output entry is the dot product of one row from the left matrix and one column from the right matrix. In general, AB is not equal to BA.
Concept 3
A nonzero determinant permits an inverse
A square matrix is invertible exactly when its determinant is nonzero. Solving Ax=b can then be written as x=A⁻¹b.
Worked example
Find det([[1,2],[3,4]])
- 1For a 2×2 matrix, compute ad−bc.
- 2Multiply the main diagonal: 1·4=4.
- 3Subtract the other diagonal product: 4−2·3.
Answer
Common mistakes
- Adding matrices with different dimensions
- Multiplying entries position by position
- Assuming every square matrix has an inverse
Check your understanding