Today. It's a big.
Is this?
Think. And that's what do in my life.
Okay. Good morning, everybody. Let's get started. I hope you've done the quiz.
Let's quickly go through that. So the answer to problem one is no output because there's a semicolon.
The answer to problem two is true, which in MATLAB appears as one.
The answer to problem three we have a determinant of a two by two matrix and it's minus two.
The answer to problem four is about 4.5.
Depending how accurately you count, because that's the square root of the condition number of the matrix, which is 20.
And so let's say the answer to number five, how long does it take if you increase from dimension 4000 to 6000?
It should it should go quickly. So it's around 5.4 seconds.
Actually, on my machine, it was 4.7 seconds.
The answer to number six. About what are some names of non symmetric matrix iterations?
While there are lots of them, there's CG and there's like Q are there's by C, G, there is by C, G, stab and so on and so on.
Kumar. They go on and on. The answer to number seven.
What's the non symmetric analogue of the lunchbox iteration?
That's the Arnold iteration. And then the answer to number eight.
What is my first name? It's Lloyd, actually.
I'm Lloyd. Nicholas. Professor. I hope you all knew that. McHale.
Would you be willing to go get me a bottle of water? I have a kind of a cold, and that might help.
Yeah. Okay, so today we're switching to a part.
Two of the three parts of this term, and the heading here is dense linear algebra.
So we started with sparse linear algebra.
And the dense stuff is, of course, a huge field that I'm only going to touch on certain very basic aspects of.
Of course, all of you have encountered linear algebra in many ways over the years and you know some of this.
But I hope that the way we look at things will be a little different from the way you're used to it.
One place to read about this point of view is in my book, Professor, and now just at the beginning, in chapters one, two, three,
talks about the point of view that I'm going to express, which is all about thinking about matrices and vector vectors via their columns.
So let's start with what I'll call section 2.1, and that's matrices, vectors and expansions.
So of course, you know what matrices are and you know what vectors are.
But the basic point of view I want to recommend is that often in basic numerical linear algebra,
it's good to think of a matrix as consisting of a collection of columns.
So this is the picture we can often draw for a matrix.
The first column is a one and the second is a two, and so on up to a n.
And when I draw that picture, I'm certainly not assuming it's a square matrix.
Typically, I'm assuming that it has at least as many rows as columns and maybe many more rows and columns.
Now a typical matrix times vector. I would then draw like this.
x1x 2... down 2xn.
So of course, you know the formula for a matrix times a vector here.
We learned that in school, this kind of thing. But the way I want you to think of it is as a linear combination of the columns.
So if A X equals B, notice the way I'm drawing the picture.
I'm not telling you anything about the individual entries of these columns or about the individual entries of B.
Moreover, A is rectangular. B has the same length as A, whereas the length of x corresponds to the width of A.
So that is the way I want you to think of A X equals B.
So in other words, B is a linear combination.
Let's write down some things here. A J is the Jth column of the Matrix a.
X sub j is the eighth entry of the vector x.
And then B is a linear combination of the columns of A.
With coefficients x sub j.
So whenever you have a matrix vector product, you may interpret it that way, and often that's the right way to interpret it.
We could write the formula B is the sum from one to end of x sub j a sub j.
Of course that's a number and that's a vector.
Okay, now standard terminology, we say that the range of a which is also known as the column space of a.
Thank you very much. So. These are to above and beyond the call of duty.
So the range or the column space of A is the set of all things you can get when you multiply A by some X like this.
In other words, it's a set of all linear combinations of the columns of a set of all such linear combinations.
And that's a vector space and all sorts of things are known about them.
It's a vector space of dimension at most end. So it's a vector space.
At most, and it will be of dimension. And if the columns are linearly independent and dimension less than if they are linearly dependent,
which means there's some linear combination of them with non-zero coefficients that gives you the zero vector.
And this number, the dimension is the rank of a also known as the column rank.
Are they? Now, if a matrix has rank and if rank of A equals N, then we also say that A has full rank.
And if the rank is less than ten, we often say that A is rank deficient.
So these are standard terms that people like me use all the time.
Now, of course,
one of the things we want to do with matrices and vectors is to try to find expansion coefficients to match a particular right hand side.
So that's the basic problem of linear algebra, given B, find X,
and that makes sense even in this rectangular case where we're not assuming that the matrix is square.
It's still a reasonable question to ask. So let me move over to here.
So let's ask the question given be.
Is there an x such that well, a x equals B would be nice, or maybe a x is in some sense close to be if a square.
Of course, that's something we hope for. If a is rectangular, we're more likely to hope for that.
So that's the basic problem of linear algebra.
And when I posed it this way, I'm thinking of B as the data vector.
So B goes from B one up to B, M if you like.
It's the data and the x vector we're looking for.
Is the coefficient vector. So of course the case we know best is when a is square and in vertical.
And in that case, if a is square and investable, then we all know the solution to this problem.
It is X equals a inverse B, that's the inverse of the matrix.
And I want you to think about that expression.
What that can be interpreted as is a statement that to get the coefficient vector for an expansion, you apply a inverse.
So a inverse is an operation that matches you, that maps you from data to coefficients.
So a inverse maps.
From Data. Two expansion coefficients.
And indeed, I recommend that you set up a neurone in your brain that sort of fires whenever it sees that kind of a thing.
It should fire and say, aha, coefficient vector. Somebody is interested in a coefficient vector for a vector b.
So let's not even write that down yet another way whenever we do a solution of a system of equations.
Another way to say that is we're finding a coefficient vector for a matrix equation for an expansion of a vector B in a basis.
Of columns of a. So that's going to work most cleanly if a square and non singular.
But it also makes sense when a is rectangular and then we can talk about trying to get close to B,
we can try to approximately solve a system of equations, find a coefficient vector that is a pretty good expansion, even if it's not exactly right.
So let's say a little more about that. Suppose A has more rows than columns.
Then in general, we're not going to be able to solve X equals B.
Exactly. So we could put it like this unless B happens to be in the range.
Then there will be no solution. So unless B happens to be in the range of a, a,
x equals B has no solution by definition the range of defined as all the B's for which there is such a solution.
So in this case. We can look for approximations.
With the property that in some measure is close to be.
And indeed one of the axioms of numerical linear algebra is that almost any problem that
makes sense with a square matrix can be generalised to a problem with a rectangular matrix.
And often that generalisation is a more robust formulation of the problem.
So this is what will lead us in a moment to least squares.
Which is one particular natural choice of what it means for a ex to be close to me.
I want to say a word about the continuous analogue of these things.
So the normal way that people like me think about matrix problems is as matrix
problems in which there a certain number of rows and a certain number of columns.
But when you draw this picture, nothing in the picture requires these columns to be discrete.
They could be continuous, they could be functions.
So the very same picture would apply if we're trying to expand this function as a linear combination of these functions.
If you're thinking matrices, that's the case where m the number of rows goes to infinity.
You can imagine a very long, skinny matrix. Well, as M goes to infinity, you get some kind of a function analogue.
And that's, of course, a very old idea. So as the number of rose goes to infinity, we can think of continuous functions.
So we can think of each column of a as a function of some independent variable, let's say T and similarly B would be a function.
So that could be functions, let's say, of T on some interval, if you like.
All the linear algebra that we do has analogues.
In this continuous case, everything is still defined.
So for example. Range of a is the same as before.
If a is an object whose columns are functions, the range of A is the space of linear combinations of those functions.
Again, it will have dimension at most. M If it has dimension, exactly.
And we can say it's a full rank and so on. The rank of A is the same defined as before.
So it's the dimensionality of the set of all products A, B.
So this, as I say, is an old point of view, although there isn't that much literature on it.
In this case, the term that seems to have taken hold is that a is called a quasi matrix.
And the reason this stuff interests me. Well, one reason it interests me is that I think all of computational science,
all of numerical linear algebra, is about this interplay between the continuous and the discrete.
Typical problem we try to solve with matrices might be obtained by describing something continuous.
So ultimately it's this that we care about at the continuous level.
It's also of interest to me because of the Fun Software Project, which is something I'm engaged with.
So at a software level this turns into fun, which I'll show you a little bit about, maybe a little today and more later on.
So let's see. I want to show an example, discrete enough quasi matrices and this on the reverse of the quiz is M7.
So if we go to M7, let's type A equals 123456220.
So there you have a three by three matrix a. And I just want you to practice thinking of eight times a vector as a linear combination of the columns.
So, for example, suppose I say a times the column vector one zero.
One. Now, of course, you can calculate that any number of ways.
But I want you to think of that instantly as the first column, plus the third column.
So that should give us 410 to. Similarly.
Let's do one more. Suppose I say a times.
What do I have here? One minus two zero.
So that's the first column minus twice the second column.
So that should give me. Somebody murmuring.
Did I miss type? No. What will that give me?
Minus three. Minus six. Minus two.
So linear combinations of columns is a fruitful way to think.
Now, of course, we can type something like inverse of a times 2 to 2.
And what I ask you to do is think of that not just as some matrix operation, but as the extraction of a coefficient vector.
So that is the vector of coefficients. When you expand the vector 2 to 2 in the columns of a.
In MATLAB and indeed in numerical computation, generally, you don't normally construct an inverse.
So this inverse of A is not an object that people would really construct, although you can, of course,
it's more accurate and more efficient to bypass the inverse so that in MATLAB, the way you'd really solve this is to two, two, backslash, 2 to 2.
So it's an interesting coincidence that when we did it with the inverse, obviously there were some small rounding errors.
When we did it this way, there were no rounding errors. That's not typical.
Of course, normally there will be rounding errors. We were just lucky.
Now continuing on what you see here, the kind of thing people do with matrices all the time is do long skinny matrices.
So let's do that. I'll shrink the font a little bit or maybe too much.
Okay. So suppose I say t equals the vector from zero and steps of 0.1 up to two, and I make that a column vector.
So there's t, there's T.
So this is some kind of a discrete approximation to the function T on the interval from 0 to 2.
So I could now say flat t e to the minus t, and I could make that, let's say, a red line.
So there we have a picture that looks like E to the minus T, but of course, it's not really it's actually a vector with 20 pieces in it.
Plotted by connecting the dots with piecewise linear.
It only looks so good because it's a nice smooth function.
Now let's do a little linear algebra and interpret the linear algebra in terms of that picture.
Let's make a. As a matrix whose first column is t two.
The zero second column is TI to the one and third column is ti squared.
And let's see. I'll detach this thing so we can see the matrix.
Okay. So the thing I've just constructed is a so-called Van der Monde matrix.
The first column is T to the zero, the second T to the one. The third is T squared.
Obviously, it's some kind of a discrete approximation to a continuous object,
a very basic matrix that we might use for some kind of data fitting problem.
So let's do a little data fitting. Let's make a coefficient vector x, which will be one minus one one half.
Now. Why did I pick that vector?
Because those are the first three Taylor coefficients of E to the minus T, so e to the minus T equals one minus T plus the half T squared and so on.
So that data vector corresponds to a taylor approximation to the functioning, to the minus t at t equals zero.
So if we multiply. A by that vector, we get that approximation.
Let's see. I say hold on and then I'll say plot T against a times x.
So this will show me the Taylor approximation to the function e to the minus T, at least on this discrete grid of 21 points.
So notice it does just what you would expect of a Taylor approximation.
It matches the function beautifully at zero. And then it wanders off in some other direction.
Now we're going to do least squares in a moment. But first, let's just illustrate least squares.
So suppose I say x equals a backslash e to the minus t.
So let's think about that syntactically. First, before I type return e to the minus t is a vector of length 21.
I've got a spurious parentheses there. I'll have to get rid of a backslash.
Well, that neurone should fire in your head. Right.
So you immediately know that that is going to compute the expansion vector, the coefficient vector x.
In some sense, but it's going to be in a least squares sense because a is this long skinny matrix.
So if I do that, it's actually giving you a vector of coefficients which will give a least squares approximation to the data.
And if we plot that, we can see it. So let's say plot.
T against a x. And I'll make this one black.
So you see the big difference. The Taylor approximation is all at the origin.
The least squares is global and it's obviously done a good job of fitting the function.
So this function can be very well approximated by a parabola on the interval from 0 to 2.
And just to play with MATLAB, as we always do. I hope you know the legend command.
You can do things like this. I'll say e to the minus t taylor least squares.
The Legend Command puts a legend on your plot and you can put it in whatever corner you like.
So I say Location Southwest and there you see it's put the legend on the plot.
Oops. Okay.
So you see that Lee Squares obviously has something going for it.
Let's finish this demo by just plotting the error for the least squares approximation.
So if I say plot T against a x minus E to the minus T, that's the error.
So if you look at the axes, you can see the error is nice and small.
We begin to see the discrete nested 20 segments and the error is about .02.
Okay. Any comment? Now, since we do seem to have enough time, let me just give you a hint of how to have fun.
Does continuous analogues of this so intense fun I can do things like this.
I'll say from 18, I could say let's create a variable on the interval from 0 to 2,
and then I could say A equals T to the zero, T to the one, T to the two.
And now we have a truly continuous object. So it reports that it's a telephone consisting of three columns, and the three columns do the right thing.
So, for example, if I plot a. You'll see.
The three columns one an x and x squared.
And I can do all sorts of things like at least squares. So let's try that.
I can even do the continuous analogue of least squares. I could say, let's see, one of our data vectors was that one.
So I could say plot, I could say x equals E to the minus T and I could say Plot F.
And then I could say. Plot.
Hold on. Then I could say plot a times X as a blue line looks blues, a boring colour.
So here we're doing exactly the same kind of thing, except we've taken the number of rows to infinity,
as it were, where in some sense dealing with actual functions.
So there's E to the minus T, there's the Taylor approximation, and let's do the least squares analogue.
If I say A equals a backslash f.
I could now say Clark a times ex as a red line.
So there you can see we've actually done a continuous least squares approximation rather than a discrete one.
Everything looks the same because this isn't a very exciting function, but it's truly the continuous analogue of this discrete stuff.
If I plot the error, that's a X minus F, so it looks about as it did before, except now it's smooth instead of discrete.
So we've had a lot of fun in fun doing all kinds of neat stuff, which I will show you more of later.
Okay. Well, we're about halfway through linear algebra. Yes.
Is. Is it finding a quadratic which is close to the least square?
Yes, because the reason it's a quadratic is that the quasi matrix had three columns, which were one and T and T squared.
So a linear combination of them. Is that quadratic? Okay.
So I haven't really told you what these squares is, though. Of course, you all know, I'm sure.
But in order to talk about that, we need to talk about orthogonal ity.
So, uh, 2.2 is orthogonal vectors and matrices.
Now. You know me. I always like history. One of the interesting bits of history here is that our technology is, of course,
a very old idea mathematically, but in the 1960s it moved to centre stage algorithmically.
Before that, people had been doing solving systems of equations and so on, using non orthogonal methods.
And in the sixties, they pretty much discovered that most things could be done more accurately using orthogonal methods.
So for 50 years now, orthogonal linear algebra has been a very central part of the field.
Now, let me remind you of some standard definitions. We start with the idea of an inner product between two vectors.
So if the. And w are vectors, then.
We write it like this. V. Transpose w.
Is equal to the sum of v j.
WJ. Couple of comments here. The default notation in this field is always that a vector is a column vector.
So v transpose w means we have something like that multiplied by something like that.
Another comment is I could write J goes from one to M or something if I wanted to emphasise the row index.
But I prefer this way because well, it could be anything.
It could be continuous. This could in the continuous analogue that would turn into an integral of v.
Of t times w. Of t. Another comment I could make is the formulas I'm writing down are for real numbers.
If you're dealing with complex numbers, then an inner product would have a complex conjugate for it.
Okay, so that's the standard idea. And we say that the and W are orthogonal.
If the inner product is zero.
And we say the norm of a matrix of a vector, which is also called the two norm.
Is defined like this. We write it like that.
Or if we want to emphasise that it's the tune arm, we could also write it like that.
And it's the square root. Of the transposed feet.
If we have a set of vectors, that is to say more than two of them, let's say, so a set of vectors.
And when they're orthogonal, they're often going to be written as.
Q So let me do that. If suppose I have a set of vectors.
Q Sub J We say that they are orthogonal.
If each pair is orthogonal. So we could say if they are pairwise or orthogonal.
When I write. Q Usually it's going to have a further property of being normalised, have length one.
So we say that a set of vectors are auth a normal.
Which is abbreviated o. N. If in addition.
Each one has norm. One.
So if you have a vector, you can always normalise it.
If it's non-zero, you can normalise it by dividing by its norm and then you'll get a normalised vector.
Or you could divide by minus its norm. So there's always that plus or minus sign choice.
So let's suppose that we have a set of ortho normal vectors.
So I'll imagine that Q1 through Q n our ortho normal.
Then. Why is all the normal ortho normality so interesting?
Because then inverses turn into multiplication and to get expansion coefficients all we need our inner products.
So let me write that down. In this case, we get expansion coefficients.
Via inner products. And I want to write that down in a matrix fashion.
So first of all, in a non matrix fashion, if a vector B is expanded as a linear combination.
X. J. Q. J. Then that's the same as saying.
If the Q JS are ortho normal. That x j equals q j transpose b and why is that?
Well, I multiply this equation on the left by q j transpose.
So of course that's q j transpose b and then here we get the linear combination of x j times QJ transpose and you
see that all the all the ones that the inner products of Q II and Q J that are different I and j go to zero.
So this is the great benefit of ortho normality you get.
Expansion coefficients by products. So let's write it via matrices.
So in the matrix picture. We, as usual, think of a long, skinny matrix whose columns are.
Now. Q one. Up to q in.
Author Normal. And I can imagine multiplying that by x1x2 up to x m and getting a vector b.
So this equation as a matrix equation could be written capital q x equals B where Q is a whatever by n matrix.
Now we multiply on the left. By the transpose of Q.
Which is a and by whatever matrix.
So imagine multiplying this thing on the left.
I'm just going to draw it schematically. We have rectangle times.
Vector equals long vector. But now we multiply on the left.
So we get. Transpose a rectangle times rectangle times.
Short vector equals transpose of rectangle.
Times long vector. So multiplying that thing on the left gives us the equation that x one down two x end.
Is equal to. And now let's do that. Schematically, it's this long.
Vector whose first row is Q one transpose second row Q to transpose third row and so on down to the end throw is q.
N. Transpose times b.
So as a matrix equation, this is the equation that X equals Q transpose b.
And notice here I'm writing equations involving rectangular matrices.
I most certainly have not assumed that Q is square. What I've done makes sense in general.
So it's interesting how different fields use different notations.
In Physics, which is the other field I would know best, I guess.
Of course, exactly the same formulas are used all the time,
but they would typically be written as summations rather than in this kind of matrix notation.
But numerical people have found that the matrix notation is a very simple way to go towards algorithms.
So that's how we prefer to write things. Okay.
That's all for arbitrary matrices with all the normal columns, but a very important special case.
Let's move over here is when they are square matrices with all the normal columns.
In fact, there's no name for one of these matrices, which is a great shame matrix with all the normal columns.
There's no name for that. It might be called an All the Normal Matrix, but that's not a standard term.
The standard term only arises once it becomes square, and then it's called an orthogonal matrix.
So let's now talk about an orthogonal matrix.
So it's. An orthogonal matrix.
Which we could write. Cue is a square matrix.
With all the normal columns. So everything I've written down applies in this case too.
But then more also applies because we can talk about the inverse.
So in this case. Let's draw the square picture of Q transpose times.
Q. So here's Q here's Q transpose.
Q consists of vector column vectors.
Cue one through. Cue in. Q Transpose consists of row vectors.
Q one transpose through. Q And transpose.
Now when you multiply that by that, you're getting inner products of the various Q transposes with the various cues and it's sort of normal.
Then all of those inner products are zero except on the diagonal where you get one.
Because it's not just orthogonal, it's ortho normal. So we get the identity.
Oops. We get one, one, one, which is the identity.
So just from this notion of or thug analogy, you can see that in the square case.
Q Transpose is the inverse of. Q Because you multiply them together and you get the identity.
So that is.
If you have the same number of rows and columns and an author normal matrix with all the normal columns we have Q transpose Q equals the identity,
so Q transpose equals Q inverse.
And it's a standard fact of linear algebra that that also implies that Q.
Q Transpose is the identity.
So in this case you your neurone can fire whenever it sees Q transpose.
So whenever you see a. X equals Q transpose b.
That's the same as saying X equals Q inverse b.
So in this case of a square matrix, that's how you extract coefficients.
And that's a hint about the numerical algorithms. Multiplying something by this matrix is much easier than computing a whole new inverse matrix.
Okay. So this is how you get expansion coefficients when you're dealing with an orthogonal matrix.
And just to hammer the point home ad nauseum.
X in this case would be written as.
This matrix. Q one transposed down to.
Q n transpose times. B. Okay.
So this gives us a convenient notation in which a lot of things are easy to write down.
Let's give an example of that. So it's too simple to call it a theorem.
Let's call it a proposition. If Q is orthogonal.
Then for any vector x the norm of q x.
Is equal to the norm of X. Well, that's plausible enough because the Q is going to maybe rotate or change the change basis and come kind of a.
A non stretchy kind of away intuitively, but let's verify it algebraically and the matrices are very convenient for that.
So q x. Norm.
Well, the square of x norm is the inner product of Q X with itself.
So remember, my definition of a norm was the square root of this. So the norm squared is that.
And now you all know that when you have a transpose of a product, that's the same as the product of the transposes in reverse order.
So that is equal to X transpose.
Q Transpose. Times. Q.
Times X. And now this is the identity.
So this is equal to x transpose x. So here we have the norm of x squared.
And it's interesting practice if you're thinking about this stuff and I'm sure you all know these things from some angle,
maybe not using this notation, it take the angle you're most familiar with and see how it translates into this.
See what is being really said here by each of these terms.
Okay. So it remains to write down these squares and basically with all these orthogonal tools in hand,
the algebra of these squares sort of comes immediately. So let's suppose we have a matrix a.
And it has more rows than columns. So if we want to be explicit, we could say it's m by n with.
M bigger than n. Then in general, we can't expect to be able to solve X equals B, but we might be able to find a good approximation.
And we say that at least squares. Solution to X equals B.
Is a vector x with the property that the norm of x minus B is as small as possible.
That actually explains me is called the residual. And all it takes is a picture to see how to solve this problem.
So this is a picture I draw a lot. You imagine in some abstract space the set of all possible m vectors.
So this is the space. Our M.
It's a vector space, an m dimensional vector space. And now you imagine that the subspace of our M, which is the range of a.
Now a. Only has n columns. So the range of a is a subspace of dimension at most.
N it could be less or it could be n. So the range of a is a subspace of our m of dimension at most.
N And now we have a point somewhere other over here.
Be. And our goal is to find an X such that a x minus B is minimal.
In other words, we want to find an x corresponding to the point in here.
Closest to be the solution is immediate from the picture.
Obviously one can prove this algebraically.
The closest approximation to be in this space is a point there characterised by this right angle here orthogonal.
I'm just using your geometric intuition. Of course one can prove that algebraically.
So to solve the least squares problem, you want to find that point there such that the range of a is orthogonal to the residual.
So to get the solution to our least squares problem, we want the range of a.
To be orthogonal to X minus B.
Now, another way to say that is we want. Each.
Column of A to B, orthogonal to A, X minus B.
So we want a oops. We want a J transpose x minus B to be zero for each column of a.
So the picture tells us what algebraic problem we need to solve to do least squares.
So there's our algebraic problem. Another way to say that is that a transpose times A, X minus B should be zero.
Or another way to say that is that A transpose A should be A transpose B.
So that's the simplest derivation of an algebraic condition to solve.
Sorry, there's an X here. To solve the least squares problem.
This set of equations is called the normal equations.
So we've defined orthogonal ity,
we've used a picture to characterise a least squares approximation and then from that picture we've derived a formula.
A linear system of equations symmetric, positive, definite, or at least positive as indefinite.
It could be non-negative definite in the ranked deficient case.
We still have one minute, so let's do the other demo. So now this is m eight.
Suppose I now say t equals to pi times.
Numbers space between zero and one. So T is now a vector that basically goes from 0 to 2 pi.
And suppose I say a equals. It's in my computer somewhere.
There we are. So A is now a matrix of five columns which are one, and then sine t and cosine t and sign to t and cosine to t.
So you see, we're doing a trigonometric type of approximation here.
If I compute a transpose times a there it is, it's a bunch of inner products.
You can see the orthogonal ity of signs and cosines.
If I plot a, you can see signs and cosine democratised in 30 points or if I want to get the x axis right, I should really say plot of t against a.
And now let's make a particular. Right hand side vector, which is already in my computer, and I'll plot it.
I'll say T, B, and I'll plot it as black circles.
Oops. So that's a right hand side vector which is picked just to be I'm using piecewise linear, let's do least squares.
So if I type this in MATLAB, it's going through some algorithm which we haven't actually talked about,
which is mathematically equivalent to solving this system of equations.
So it finds the vector x corresponding to the least squares solution.
And if I now say Hold on and plot T against a times X.
You can see we have a nicely squares fit to that data. Continuing with this example, let's perturb the data.
So I'll say B equals B plus some random perturbations.
And now I'll plot that and I'll say plot TB.
Okay, so now we've got the same data,
but perturbed if I do the same thing where we know least squares is pretty good at dealing with noise, so we should get a similar vector.
It's not so different. And if I do hold on and then plot T against x.
We see that the least squares solution has done that. Of course, all of this could also be done in a continuous setting.
Okay, that's it for now. Thanks.