Skip to content
Tactiverge

Learning Rooms/✦ Level 5 · Research Engineer/Mathematics

16. Projection Matrices and Least Squares

MIT OpenCourseWare · Length: see YouTube · captions on YouTube · nothing loads until you press play

By the end you can…

  • Write a line fit as an over-determined system A·p ≈ y.
  • Derive the normal equations AᵀA·p = Aᵀy by minimising the sum of squared residuals.
  • Interpret residuals and recognise the sensitivity of least squares to outliers.
?Predict▶Watch✓Practise⚙Build

Watch it all: no segment has been checked by hand for this video yet.

1.Predict before you press play

At the least-squares line, what is the sum of the residuals (not squared)?

Pick one before you press play. A wrong guess is fine: it is what makes the video stick.

2.See the idea first

Play with this diagram for a minute. It gives you something to hang the video on.

Loading the interactive…

Can't use the diagram? Read a description instead

The least-squares diagram plots data points, your adjustable line and vertical residual segments. Sliders set slope and intercept; text gives your sum of squared residuals, and a button reveals the optimal line and its sum.

3.Watch, actively

Derives the least-squares line by projection, arriving at the same normal equations AᵀA·x = Aᵀb that this term derives with calculus.

Length: see YouTube · captions on YouTube · source

Nothing loads from YouTube until you press play.

Watch for…

  • → Strang reaches the same normal equations by projecting y onto the column space. Compare with the calculus derivation here.

Pause whenever you like. Rewatching a hard minute is a good habit, not a failure.

Can't stream it? Read the idea instead

When there are more equations than unknowns, no exact answer exists. Least squares finds the closest one: project the data onto the space the model can reach, which leads to the normal equations AᵀA x = Aᵀb.

What the video covers (our own note, written when we verified it): Derives the least-squares line by projection, arriving at the same normal equations AᵀA·x = Aᵀb that this term derives with calculus.

Written by Tactiverge in our own words, not a transcript. The full lesson below explains the idea without the video.

Jot down one thing that surprised you and one question you still have.

Private: saved only on this device, never sent to Tactiverge.

4.Practise what you just saw

These come from the lesson that use this video and are checked on the server. Wrong answers get a hint and another try.

Practice 1 · a fresh version every time

Fit y = m·x + c by least squares to the points (0, 0.3), (1, -0.3), (2, -1.2), (3, -2.8). What is the intercept c?

Practice 2

At the least-squares solution, the residual vector r satisfies…

Practice 3

Which model can be fitted by linear least squares directly?

Practice 4

One reading is wildly wrong. What happens to the least-squares line?

5.Try it yourself

No simulation models this idea yet. The lesson below has an interactive diagram instead.

6.Build something with it

Follow-up project

In the Code Lab, generate 20 noisy points from y = 2x + 1, fit them with the normal equations, and repeat 200 times. Plot the histogram of fitted slopes: how wide is it, and how does it change with 80 points?

Where this video lives

In the course catalogue: MATH-510 Applied linear algebra

The video is by MIT OpenCourseWare, embedded from YouTube with privacy-enhanced mode and never autoplayed. The room around it (prompts, notes, practice, projects) is Tactiverge's, written with AI assistance and checked by automated tests only.