AI engineering glossary · Linear algebra
What is least squares?
Least squares (also called Ordinary least squares): A method for finding the vector x that makes A x as close as possible to b by minimising the sum of squared differences, used when a system has more equations than unknowns. It is the mathematical core of linear regression.
Least squares: an example
Fitting a line through 50 noisy points means finding the slope and intercept that minimise the total squared vertical gaps.
Related terms
More Linear algebra terms
- Linear combination
- Linear independence
- Linear transformation
- Low-rank approximation
- Lp norm
- LU decomposition
- Matrix
- Matrix multiplication
Where you learn it
Least squares is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.