 In our previous video, we saw that we can use matrix inverses to solve a matrix equation. Specifically, we had the linear, the matrix equation, AX equals B. Now, in terms of matrices, this is a linear equation, but this matrix equation, AX equals B represents a linear system, a whole linear system of equations. And by multiplying on the left hand side, on the left, on both sides of the equation by A inverse, we see that X equals A inverse B. We can solve that equation. Now, we can solve nonlinear matrix equations by similar methods if we know how to, how this inversion operation interacts with our other operations. So suppose, for example, that A and B are both non-singular matrices. Suppose we have some positive number M, some non-zero scalar R, then what we can see is the following. If A is a non-singular matrix, it's invertible, then so is its inverse. The inverse of a matrix is itself invertible. And the idea is that the inverse of the inverse will be the original matrix A. So A inverse has an inverse because A is its inverse. All right. If A and B are both invertible, then the product A times B is also invertible. And we get the formula right here. The inverse of the product is the product of inverses. But notice that things get swapped around that when you had A then B, but that's followed by B then A. We saw the same thing when we talked about the trace, and this is what I refer to as this so-called shoe sock principle. And that's, that's actually, it gets its name from this idea right here. So in the morning, when you put your socks on, then your shoes, you go about your day. But then when you come home, you take your shoes off first, then your socks. When you reverse the process, you have to do the process backwards, the shoe sock principle here. Speaking of traces, if you take the inverse of a trace, this is equal to the trace of an inverse. So if A is non-singular, then A transpose will also be non-singular. I said trace there, I meant to say transpose in both of these situations here, that the transpose map has the shoe sock principle, inversion has the shoe sock principle as well. And so the inverse of the transpose is equal to the transpose of the inverse there. The next thing to mention here is that if you take powers, right, if you take A to the A to the, or A times A times A times A times A times A, that is you have A to the M, that is an invertible matrix. And in particular, the inverse of A to the M is just take A inverse to the M. And that's actually what we're going to define to be negative exponent. So this is the definition. If you see a matrix raised to a negative exponent, that means we are going to compute the inverse M times. And this only is applicable for non-singular matrices. Similarly, if you ever see a matrix raised to the zero with power, that means the identity matrix. And finally, if you take the scalar product of a matrix times say some scalar k, I guess I said r earlier, that we'll call that a k, k times A inverse is going to equal 1 over k times A inverse. So you have to take the reciprocal of the scalar in this consideration here. And so these are some nice properties of matrix operations. A corollary of that is that if matrix A is invertible, then A times A transpose and A transpose A will likewise be invertible matrices. This is a fact we're going to use much later in the semester when we talk about the least squares problem that the non-singularity of A implies the non-singularity of these products, A transpose and A transpose A. So I want to demonstrate how we can use these properties of matrix inversion to solve matrix equations. So let's take, for example, the equation A times X inverse, inverse plus B is equal to C. And how would we go about solving this matrix equation? Now, there is issues of course that we can only take the inverse of a non-singular matrix. So for the consideration of this question right here, just assume all the matrices are appropriately non-singular. And let's assume that everything has the right size so that the products and sums make sense. We'll just assume everything's an n by n matrix and that things are non-singular when they have to be. Again, that is a little bit of a caveat, but if we have that assumption, we can solve this much like we would solve any other thing. Now looking at the first one right here, we want to solve for the variable matrix X right here. And so if you have a product inside of an inverse, you can use the shoe sock principle and you can distribute the inverse there. And so you're going to get that X inverse inverse times A inverse plus B equals C. So the shoe sock principle comes into play here. And we took the inverse of the product. It switches the order around. So now the X shows up first and then A. And then if you have the double inverse, like we saw, that's equal to just X right here. So X times A inverse plus B equals C. And so then to go from here, I would subtract B from both sides. We can be kind of careless when it comes to matrix addition and subtraction because it works very well, very much like vector addition and just scalar addition and subtraction there. So you're going to get A inverse is equal to C minus B. Now the thing to do next here is you have to be very careful that if we want to get rid of A on the right hand side of X, we need to multiply the right hand side by A because A inverse times A will cancel out as the identity. But then we have to do that to the right hand side as well. Make sure that you multiply both sides on the right. Left multiplication is not the same thing as right multiplication. And so this would simplify to be X equals C minus B times A. Now this would be the solution to this matrix equation. If you want to, you could also distribute the A and so you could get C A minus B A. If you prefer those would both be equivalent solutions by the properties of matrix operations that we've been determined here. So when you're solving matrix multiplication, there's two things are solving matrix equations. One thing, two things I want you to remember is one, matrix multiplication does not commute. So multiply on the left is not the same thing as multiply on the right. So if you multiply on one side on the left, you have to make sure do the other side on the left or one side on the right, the other side has to be on the right as well. So watch out for matrix multiplication does not commute. The other issue is we can only have reciprocals for non-singular matrices. In this problem, we avoided the issue just by assuming everything was non-singular. But in general, that's something you have to watch out for on a sort of like in physics, a frictionless situation doesn't actually exist. But sometimes we remove that we add this assumption that there's no friction just to make it easier for physics students. That's what we're doing right here. You can assume that everything's non-singular even though in real life that's a ridiculous assumption.