16. Projection Matrices and Least Squares
MIT 18.06 Linear Algebra, Spring 2005
Instructor: Gilbert Strang
View the complete course: ocw.mit.edu/18-06S05
KZread Playlist: • MIT 18.06 Linear Algeb...
16. Projection Matrices and Least Squares
License: Creative Commons BY-NC-SA
More information at ocw.mit.edu/terms
More courses at ocw.mit.edu
Пікірлер: 281
I am a graduate student majored in electrical and computer engineering. Though most of us have learned linear algebra in undergraduate study, I would like to highly recommend this course to those who are interested in machine learning and signal processing. Thank you Prof.Strang!
@cagrkaymak3063
6 жыл бұрын
same for me, I am a grad student too but I learn a lot from these lectures
@andre.queiroz
5 жыл бұрын
I'm finishing college and I'm studying this to get into Machine Learning.
@qiangli5860
5 жыл бұрын
I am also a graduate student majored in ECE. machine learning and numerical linear algebra.
@alexandresoaresdasilva1966
4 жыл бұрын
Same here. The insights are invaluable - the lecture about projections finally clarified why a color calibration project I had during my undergrad didn’t always work well. These lectures should be used to teach linear algebra everywhere where there’s no really strong linear algebra classes, as image processing/ML tend to require way more command of linear algebra than what the common linear algebra college classes(talking about Texas Tech here) tend to offer.
@johncarloroberto2635
3 жыл бұрын
Same I graduated with an ECE degree, but our curriculum didn't have linear algebra so I'm taking this in order to pursue a masters with a focus in machine learning. The intuition and guidance Prof Strang offers is really great!
"please come out right". "oh yes!" "thank you god" 😂
@MasterCivilEngineering
3 жыл бұрын
Good
@super-creative-stuff1421
3 жыл бұрын
I think it's that sort of personality that my teachers in school were missing. They didn't care about math at all.
With lectures this good I can watch this instead of Netflix. I have one professor who also hold phenomenal lectures and lectures this good bring me as much joy or even more than playing a good video game or watching a good show. It is interesting and entertaining and it blows my mind. Truly a fantastic job! Thank you professor Strang!
@MasterCivilEngineering
3 жыл бұрын
Really true dear
@starriet
2 жыл бұрын
Guys, let's watch Prof. Strang instead of watching dumb TV shows!!! (well.. I'm dumb too though!)
@staa08
6 ай бұрын
These kinda people are scary bruh!!! Hats off to you for having this kinda motivation
@trevandrea8909
5 ай бұрын
@@starriet You're not dumb, the fact you watch Linear Algebra videos show you're interested in learning, and you are smart:)
18:04 and 28:12 It proves Prof. Strang is a man of his words.
@MasterCivilEngineering
3 жыл бұрын
He definitely is
@starriet
2 жыл бұрын
That's what I wanted to say :)
"Oh god, come out right here!" ... "Thank you, God!" XD I was dying at those parts of the lecture. Not only does he teach skillfully, he's hilarious too.
He does not teach Linear Algebra, He teach us to see the MATH as an art form and tells us how to draw math, and admire its beauty.
@MasterCivilEngineering
3 жыл бұрын
Yes absolutely dear
The bit at 4:54 where b is replaced by Ax giving A(A^TA)ˉ¹ATAx, which then collapses to Ax is fantastic. It's so high-level and so simple to see.
29:14 “You have to admire the beauty of this answer”. 😂😂
The mistake starts at 11:26. The right hand side is (1 2 2), not (1 2 3). But he later uses the (1 2 2) for all other calculations, so not a big deal.
@matthewwhitted-tx3xf
24 күн бұрын
Not the first time he's made a mistake and not caught it.
linear algebra is so fun in Prof Gilbert Stang 's hand.
@pubgplayer1720
4 жыл бұрын
Yeah. It's so good. It's senior algebra!
I love how you can reach the same answer also using a calculus approach.. and I LOVE the two pictures for the least squares regression. Beautiful stuff and amazing lecturer.
This is probably one of the best courses I have ever taken, Prof Gilbert Strang really rocks! Never though linear algebra can be this beautiful
Mr Strang and MIT ,thank you so much.
I love it how he does not even need to explain it carefully, but everyone was already interested in Linear Algebra taught by him. He really encourages students to brainstorm other insights based on strong background that he could provide them.
Rediscovering Linear Algebra again with Professor Strang! So intuitive with him.
Thank you Prof. Strang for changing the way to study maths rather than cramming now we not only just study matrices but can visualize itbecaue of you. Never seen a wonderful teacher like you.I hope I will meet you somday to show my gratitude. Highly recommended for everyone.
professor Strang you are excellent. Thanks a lot to you and MIT for these lectures and to all the supporters of OCW.
This is the 3rd time I am taking these lectures in the last 2 years. Thank you, professor, these lectures are amazing.
Professor Strang you are the first person who makes me deeply understand linear regression from linear algebra's point of view.
Beautiful lecture, just beautiful. Prof. Strang is drawing the beauty of Linear Algebra on a blackboard.
36:48 I legitimately was wondering this. Thank Professor Strang for answering my questions from beyond the screen
His lectures are in an endless loop. He comes back to the statements that he has said earlier in the lecture.
I can't stress my thanks enough. Thanks for everything Prof Strang, MIT.
I suggest every colleges' linear algebra course using this course video. Prof Strang makes linear algebra so intuitive, interesting and easy to understand. He plots the pictures and tells you what's going on in the vector space and then he will go back to the theory to make you have a deep comprehension
This is another great lecture by MIT Professor DR. Gilbert Strang. Least Squares put linear algebra into another world by itself.
Really an inspiration to me as how the things add up and come together. Great lecture intense easy to follow / understand
This is like pure intellectual chocolate. Gilbert Strang should've taken over Wonka's Chocolate Factory, not Charlie.
This was a really good lecture. It was packed with insights. I love how everything is coming together.
learned this about 30 years ago at Technion Haifa. If I could only have such videos or Instructor then life would have been a breeze
I'm watching this 27 years after I took a similar course in my university. Haven't seen linear algebra much during my career. Now when watching, everything seem much clearer to me. Strang is a really good lecturer.
WE NEED MORE TEACHERS LIKE YOU Mr.Strang!!!! Regards a fellow student you never met
I am econ Student and have studied Regression in my statistics class but never was able to understand how exactly was it connected to Nullspace and Column Space . Totally a new persepective , Thanks a lot for this series Prof Strang and MIT
This is a lecture of the best of the best quality. Thrilling
Glad I decided to go all the way back to basic LA, such a great and thorough review
34:29~35:13 It is really helpful for me that he explicitly pointed that out.
This video quitely provides the proof of assumption of regression that features have to be uncorrelated/independent. I have read that only in theory but now I can see exactly why. Thank you prof strang
@Eizengoldt
6 ай бұрын
Its mad that we dont learn statistics this way in class
With his lecture, I could sit in my desk all day and study. Math is so great.
The best course of linear algebra. Thanks Prof. Strang!
@MasterCivilEngineering
3 жыл бұрын
Absolutely dear
32:56 Thank you Prof. Strang.
To anyone confused at 11:25, yes, he wrote the wrong b. Instead of (1 2 3) which he wrote, it is actually (1 2 2), otherwise (1 2 3) is a combination of the columns of A (0 times column 1 + 1 times column 2)
@shekharnegi6045
8 ай бұрын
yes, you are correct, otherwise, it has a solution (0,1) but professor said no solution.
I finally understood OLS in econometrics, now I can say I comprehend what I'm doing, instead of mindlessly applying formulas and rules. Thank you verry much Mr Strang.
Excellent lecture. Professor Strang is a legend.
Beautiful lecture and amazing lecturer! Thank you Mr. Strang!
@MasterCivilEngineering
3 жыл бұрын
Thankyou
Gilbert is really good at teasing the next lecture. I have to force myself to stop watching so I can sleep.
Excellent , I was amazed to see the one to one correspondence between solving Ax=b when b is not in the column space of A and least squares fitting by a line when all the points doesn't exactly fit in a straight line
What interesting lecture is this. you showed how maths is a pillars of statistics. during the lecture I think of the assumptions of least square estimation. it comes from maths (like the independency assumption). great work. God bless you prof.
Ever great lectures, thanks professor Strang and MIT.Merci la vie!
@MasterCivilEngineering
3 жыл бұрын
Thanks and bless you
This is mind blowing. Great lecture.
Well done Mr Gilbert, congratulations
I can't stop watching these lectures...
@pelemanov from what I understand we are projecting b in to the column space so that we can actually solve the system with a best estimate. The closest (least squares) projection of b is p which will only be orthogonal if b happens to be in the null space of A transpose, but there is no requirement that this is the case. In fact if b happens to be in the column space, then the projection doesn't change b at all (i.e. P = I.)
Listening to your voice has been my priority these days.
I had horrible experiences with learning math in elementary school and since then, I've had a negative predisposition to it. This playlist is reversing that predisposition.
Nothing new in my comment. EE Grad - did all of this math in undergrad. Don't remember any of it, and never developed an intuition for it. This is so friggin' amazing!! Dr. Strang is a rockstar!
I had some trouble connecting the two pictures. What helped me to understand the connection is rewrite the original equation as Ax = b = e + p. That means we breaking down b into the error vector and its projection, p, onto A. We find e1, e2, e3, which are the elements of the error vector, by solving for C and D such as e is in the null space of A transpose.
Thank you so much, MIT
the man the myth the legend Gilbert Strang
Before this lesson, I liked linear algebra. Now I LOVE IT!!
Amazing lecture!
Thank you professor, Thank you MIT.
It is crazy... really amazed... (tears drop)
@user-je2rc1uw6r
3 жыл бұрын
Absolutely!
11:34 made a typo in b as it should be [1, 2, 2] right?
@subhasishsarkar363
5 жыл бұрын
yes
@jurgenkoopman9091
4 жыл бұрын
I think he makes these mistakes on purpose. Unbelievable there is almost no reaction from students.
@walterlevy5924
4 жыл бұрын
Yes, and he got away with it because he remembered [1,2,2] instead of using the erroneous [1,2,3] for b that he put on the blackboard.
@ZhanyeLI
3 жыл бұрын
@@jurgenkoopman9091 Maybe he wanted to inspect that if students were careful in the class
@francescocostanzo8225
3 жыл бұрын
I thought I was going crazy since this is not the top comment? Like wait if even the comment section doesn't see it then I have nothing
holy shit....18.06 for life
In 7:28, in case someone is wondering why e=(I-P)b , you can derive it as e=b-Pb, which it only meant e=b-p.
This guy is incredible.
respect for Prof.Strang
Professor Gilbert is going to make us a good space traveler😂Thanks to MIT OCW and Professor Gilbert for bringing such great lectures to us
In 22:50, in case someone is wondering why he tack on the columns like that, it is just out of convenience to solve for \hat{x} in A^TA\hat{x} = A^Tb , you could just do it in a regular way by first multiply all the matrix out and make it in a form of A\hat{x}=b , then solve it from there.
The proof of A^tA being invertible around 39:00 was great!
17:54 Considering Prof. Strang's art is teaching, he is undoubtedly one of the greatest in the world!
Prof Strang spoke so much about errors and he did make one ! :P
I always hated linear algebra, but Prof. Strang makes it fun.
I Really Like The Video Projection Matrices and Least Squares From Your
so amazing!
I love you so much. Thank you.
This is amazing
@j4ckjs What I mean, is that around minute 14:00 he says that the error is vertical instead of orthogonal to the line. I thought we were trying to minimize the error by orthogonal projection. I'm probably mixing things up, but I don't see it.
Nice explanation
This lecture taught me that finding a projection matrix for the null space of idempotent matrices is the easiest easy clap ever
MIT!! MIT!! 🇺🇸🏆👌🏼
omg sir much obliged sir, so much obliged !!
Very interesting lecture
Learning math is so... delicious!! :D I'm not even a math genius. Thanks Prof. Strang, MIT, and KZread.
For the life of me I couldn't "get" the final proof, but now I think I get it. If (A^T A) has linearly independent columns, then A has linearly independent columns. The first is (A^T A)x = 0, and the latter is Ax=0. Remember that linear independence means that the only combination that goes to zero is the zero vector. If C(A) is linearly independent, then Ax=0 means x=0.
@SalomonZevi
8 жыл бұрын
First he assumes that if A has n independent columns then the row space has rank n, and spans R^n. Therefore, if Ax=0 must be that x=0. Then he argues that if A'Ax=0 must be that Ax=0 which means that x=0.
I loved his sincerity when he thanks god @32:58
Thank you.
HES THE GOAT. THE GOAAAAAT
@43:00 I laughed like crazy. I just felt like he was saying : '' Please God let these kids understand the one most basic thign of all this linear algebra. This is about to be on tape! ''. Mr Strang is a great professor I wish I had him as teacher. Learnign alot from this linear algebra onlien course. Thank you MIT for creating open courseware
Notes: 1. For Ax=b, we can draw a picture that projection vector p plus e is equal to b. To solve linear regression problems we can calculate the A'Ax=A'b firstly. Then p=Ax, e=b-p. 2. If A has independent columns then A'A is invertible.
He might correct it later, but as I am watching it: I'm afraid Prof. Strang made a tiny error (pun not intended) at about 12:00. According to my understanding the right-hand side of the equation should be (1 2 2)^T not (1 2 3)^T. Can anyone confirm this? Awesome lecture nevertheless.
@matthewlang8711
8 жыл бұрын
+Lucas Wolf Yeah I noticed that too.
@OhCakes
8 жыл бұрын
+Lucas Wolf You are correct. It is Ax=b where b in this case is (1,2,2)
@OhCakes
8 жыл бұрын
+Lucas Wolf He does switch it back to (1,2,2) though so the output is still correct.
@rongrongmiao4638
6 жыл бұрын
Interesting that no MIT student corrected him on that...
@bayesianlee6447
6 жыл бұрын
Me too. I was just curious full why they never let him know and fix ..
I just don’t understand why other mit recordings can’t follow this masterpiece standard
@vigneshStack
4 ай бұрын
Bro if you don't mind can you explain me at 29:0 min how 5/3 value comes -2/6
Man, you are genius!!!
"Make Bases Orthonormal Again!"
@1454LOU
5 жыл бұрын
I dare any trumpster to get that.
@sajalvasal5073
3 жыл бұрын
Lol
@generalissimoblanc7395
3 жыл бұрын
Good one!
Dual Picture -> Mind = Blown
48:04..."Thank you, God". I love this man.
@MasterCivilEngineering
3 жыл бұрын
Thank you God
@dylanhoggyt I get that, but that doesn't answer my question. What I mean, is that around minute 14:00 he says that the error is vertical instead of orthogonal to the line. I thought we were trying to minimize the error by orthogonal projection. I'm probably mixing things up, but I don't see it.
28:14 I promise not to write another thing on this board xD :) Thank you so much Prof. your lectures are way more intuitive than my college Prof.
thank a lot
i learned linear regression in a statistical lecture, but i think the linear algebra way of doing it is nicer and neater.
Could you make a playlist of just proofs?