Save this video free

Linear Algebra for Engineers lecture 34: Least Squares

Alex Townsend · 50:40 · Watch on YouTube

Part of Cornell MATH 2940 Linear Algebra for Engineers F26. See all 7 lectures and search them

These notes were made with YouTube Collector. Paste any YouTube link and get the same: a summary, chapters and a searchable transcript.

Overview

Alex Townsend develops least squares as a way to solve inconsistent systems by projecting the right-hand side onto the matrix's column space, then solving the resulting system efficiently with a QR factorization. He works through a best-fit line for four data points, extends the setup to polynomial models, and illustrates fitting height and weight data from 25,000 Hong Kong students while discussing limitations of the BMI formula.

Key takeaways

Chapters

0:00 QR Factorization Connects Gram-Schmidt to Data Fitting
5:00 Projecting onto A's Column Space with Q Qᵀ
10:00 Inconsistent Systems and the Least-Squares Objective
15:00 Using QR to Reduce Least Squares to a Triangular Solve
20:00 Setting Up a Best-Fit Line for Four Data Points
25:00 Computing the Example's QR Factorization and Fit
30:00 Interpreting the Line Fit and Extending It to Polynomials
35:00 Checking Exact Solvability Through the Projection
40:00 Fitting Height and Weight Data to Examine BMI Models
45:00 Comparing BMI, Cubic, and Single-Exponent Fits

Keep these chapters and the full searchable transcript in your own library.

Transcript excerpt

0:00 squares. It's um how you fit uh trend lines to data. So you do le squares, you do grammid and then uh look at it in a particular way and it gives you trend lines. Uh so I'll show you how that all works. Okay. So okay, the joining assignment is lecture 34. This is not on the final unfortunately very sad uh section 6.5 of the textbook. Okay. So which is also not on the final right. Okay. So uh this is our well one big application of um Graham Schmidt and QR. Okay. So uh give me a ve give me a vector space. Give me a basis for that vector space. We know that we can turn

0:47 that average basis into an orthonormal one by first doing Graham Schmidt. That gives us an orthogonal one and then normalizing those vectors making sure they have length one and that gives us an orthonormal basis. Okay, we we found out last time that we can actually store G elimination a bit like how we store elimination using a factorization. In fact, Graham Schmidt is basically equivalent to factorizing a matrix A an average a matrix with average columns that are linearly independent. Right? These are linearly independent columns factorizing those average columns into a matrix with orthonormal columns.

1:38 that these are orthonormal. These have orthonormal columns still n byn and an upper triangular matrix a square upper triangular matrix. Okay, so that's what we found out last time and now we're going to try to use a= qr to uh make trend lines of data. Is there only one way to compute r? is QRPOSE A or is there is there another way? Um, okay. In class, I didn't actually compute R by doing QRanspose A which you could do that way. There's a far the way

This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.

In this course

Related notes

Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Alex Townsend.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.