Linear Algebra

Least Squares Solution (Ax ≈ b)

Find the least-squares solution xÌ‚ = (Aáµ€A)⁻¹Aáµ€b when Ax = b is inconsistent (overdetermined system).

Inputs
Matrix A (m×2)
Vector b (m×1)
Aáµ€A (2×2)
Aáµ€b (2×1)
xÌ‚ = (Aáµ€A)⁻¹Aáµ€b
‖r‖² = ‖b − AxÌ‚‖²

Data Points & Best-Fit Line

Step-by-Step Work

Put It Into Practice

The calculator shows the steps — a quiz proves you can do them on your own.

Stuck on Linear Algebra? Get 1-on-1 help

Alexander tutors all math and CS levels — $55/session, free consultation.