Main content

## Introduction to matrix inverses

Current time:0:00Total duration:14:27

# Determining invertible matrices

## Video transcript

Perhaps even more interesting
than finding the inverse of a matrix is trying to determine
when an inverse of a matrix doesn't exist. Or when
it's undefined. And a square matrix for which
there is no inverse, of which an inverse is undefined is
called a singular matrix. So let's think about what a
singular matrix will look like, and how that applies to
the different problems that we've address using matrices. So if I had the other 2
by 2, because that's just a simpler example. But it carries over into really
any size square matrix. So let's take our
2 by 2 matrix. And the elements are
a, b, c and d. What's the inverse
of that matrix? This hopefully is a bit of
second nature to you now. It's 1 over the determinant of
a, times the adjoint of a. And in this case, you just
switch these two terms. So you have a d and an a. And you make these two
terms negative. So you have minus
c and minus b. So my question to you is, what
will make this entire expression undefined? Well it doesn't matter what
numbers I have. If I have numbers here that make a
defined, then I can obviously swap them or make them negative,
and it won't change this part of the expression. But what would create a problem
is if we attempted to divide by 0 here. If the determinant of the
matrix A were undefined. So A inverse is undefined, if
and only if-- and in math they sometimes write it if with two
f's-- if and only if the determinant of A
is equal to 0. So the other way to view that
is, if a determinant of any matrix is equal to 0, then
that matrix is a singular matrix, and it has no inverse,
or the inverse is undefined. So let's think about in
conceptual terms, at least the two problems that we've looked
at, what a 0 determinant means, and see if we can get a
little bit of intuition for why there is no inverse. So what is a 0 determinant? In this case, what's a
determinant of this 2 by 2? Well the determinant of
A is equal to what? It's equal to ad minus bc. So this matrix is singular, or
it has no inverse, if this expression is equal to 0. So let me write that
over here. So if ad is equal to bc-- or we
can just manipulate things, and we could say if a/b is equal
to c/d-- I just divided both sides by b, and divided
both sides by d-- so if the ratio of a:b is the same as the
ratio of c:d, then this will have no inverse. Or another way we could write
this expression, if a/c-- if I divide both sides by c, and
divide both sides by d-- is equal to b/d. So another way that this would
be singular is if-- and it's actually the same way. If this is true, then
this is true. These are the same. Just a little bit of algebraic
manipulation. But if the ratio of a:c is equal
to the ratio of b:d, and you can think about why
that's the same thing. The ratio of a:b being
the same thing as the ratio of c:d. But anyway, I don't want
to confuse you. But let's think about how that
translates into some of the problems that we looked at. So let's say that we wanted to
look at the problem-- Let's say that we had this matrix
representing the linear equation problem. Well, actually, this would
be either one. So I have a, b, c, d times x,
y Is equal to two other numbers that we haven't
used yet, e and f. So if we have this matrix
equation representing the linear equation problem, then
the linear equation problem would be translated a times x
plus b times y is equal to e. And c times x plus d times
y is equal to f. And we would want to see where
these two intersect. That would be the solution,
the vector solution to this equation. And so, just to get a visual
understanding of what these two lines look like, let's
put it into the slope y-intercept form. So this would become what? In this case, y is
equal to what? y is equal to minus
a/b, x plus e/b. I'm just skipping some steps. But you subtract ax
from both sides. And then divide both sides
by b, and you get that. And then this equation, if you
put it in the same form, just solve for y. You get y is equal to minus
c/d x plus f/y. So let's think about this. I should probably change colors
because it looks too-- Let's think about what these two
equations would look like if this holds. And we said if this holds, then
we have no determinant, and this becomes a singular
matrix, and it has no inverse. And since it has no inverse, you
can't solve this equation by multiplying both sides by
the inverse, because the inverse doesn't exist. So let's think about this. If this is true, we have no
determinant, but what does that mean intuitively in terms
of these equations? Well if a/b is equal to c/d,
these two lines will have the same slope. They'll have the same slope. So if these two expressions are
different, then what do we know about them? If two lines that have the
same slope and different y-intercepts, they're parallel
to each other, and they will never, ever intersect. So let me draw that, just so you
get the-- this top line-- They don't have to be positive
numbers, but since this has a negative, I'll draw it
as a negative slope. So that's the first line. And its y-intercept
will be e/b. That's this line right here. And then the second line-- let
me do it in another color-- I don't know if it's going to be
above or below that line, but it's going to be parallel. It'll look something
like this. And that line's y-intercept--
so that's this line-- that line's y intercept is
going to be f/y. So if e/b and f/y are different
terms, but both lines have the same equation,
they're going to be parallel and they'll never intersect. So there actually would
be no solution. If someone told you-- just the
traditional way that you've done it, either through
substitution, or through adding or subtracting the
linear equations-- you wouldn't be able to find a
solution where these two intersect, if a/b
is equal to c/d. So one way to view the singular
matrix is that you have parallel lines. Well then you might say, hey
Sal, but these two lines would intersect if e/b equaled f/y. If this and this were the
same, then these would actually be the identical
lines. And not only would they
intersect, they would intersect in an infinite
number of places. But still you would have
no unique solution. You'd have no one solution
to this equation. It would be true at all
values of x and y. So you can kind of view it when
you apply the matrices to this problem. The matrix is singular, if the
two lines that are being represented are either parallel,
or they are the exact same line. They're parallel and not
intersecting at all. Or they are the exact same line,
and they intersect at an infinite number of points. And so it kind of makes
sense that the A inverse wasn't defined. So let's think about this in
the context of the linear combinations of vectors. That's not what I wanted
to use to erase it. So when we think of this problem
in terms of linear combination of factors, we can
think of it like this. That this is the same thing as
the vector ac times x plus the vector bd times y, is equal
to the vector ef. So let's think about
it a little bit. We're saying, is there some
combination of the vector ac and the vector bd that
equals the vector ef. But we just said that if we have
no inverse here, we know that because the determinant
is 0. And if the determinant is 0,
then we know in this situation that a/c must equal b/d. So a/c is equal to b/d. So what does that tell us? Well let me draw it. And maybe numbers would
be more helpful here. But I think you'll get
the intuition. I'll just draw the
first quadrant. I'll just assume both vectors
are in the first quadrant. Let me draw. The vector ac. Let's say that this is a. Let me do it in a
different color. So I'm gonna draw
the vector ac. So if this is a, and this
is c, then the vector ac looks like that. Let me draw it. I want to make this neat. The vector ac is like that. And then we have the arrow. And what would the vector
bd look like? Well the vector bd--
And I could draw it arbitrarily someplace. But we're assuming that there's
no derivative-- sorry, no determinant. Have I been saying derivative
the whole time? I hope not. Well, we're assuming
that there's no determinant to this matrix. So if there's no determinant,
we know that a/c is equal to b/d. Or another way to view it is
that c/d is equal to d/b. But what that tells you is that
both of these vectors kind of have the same slope. So if they both start at point
0, they're going to go in the same direction. They might have a different
magnitude, but they're going to go in the same direction. So if this is point b, and this
is point d, vector bd is going to be here. And if that's not obvious to
you, think a little bit about why these two vectors, if this
is true, are going to point in the same direction. So that vector is going to
essentially overlap. It's going to have the same
direction as this vector, but it's just going to have
a different magnitude. It might have the
same magnitude. So my question to you is, vector
ef, we don't know where vector ef is. Well let's pick some
arbitrary point. Let's say that this is
e, and this is f. So this is vector ef up there. Let me do it in a
different color. Vector ef, let's
say it's there. So my question to you is, if
these two vectors are in the same direction. Maybe of different magnitude. Is there any way that you can
add or subtract combinations of these two vectors to
get to this vector? Well no, you can scale these
vectors and add them. And all you're going to do is
kind of move along this line. You can get to any
other vector. There's a multiple of one
of these vectors. But because these are the exact
same direction, you can't get to any vector that's
in a different direction. So if this vector is in a
different direction, there's no solution here. If this vector just happened to
be in the same direction as this, then there would be a
solution, where you could just scale those. Actually, there would be an
infinite number of solutions in terms of x and y. But if the vector is slightly
different, in terms of its direction, then there
is no solution. There is no combination of this
vector and this vector that can add you
up to this one. And it's something for you
think about a little bit. It might be obvious to you. But another way to think about
it is, when you're trying to take sums of vectors, any other
vector, in order to move it in that direction, you have
to have a little bit of one direction and a little bit of
another direction, to get to any other vector. And if both of your ingredient
vectors are the same direction, there's no way to
get to a different one. Anyway, I'm probably just being
circular in what I'm explaining. But that hopefully gives you a
little bit of an intuition of well, one, you now know what
a singular matrix is. You know when you can not
find its inverse. You know that when the
determinant is 0, you won't find an inverse. And hopefully-- and this was
the whole point of this video-- you have an intuition
of why that is. Because if you're looking at the
vector problem, there's no way that you can find-- that
either there's no solution to finding the combination of the
vectors that get you to that vector, or there are
an infinite number. And the same thing is
true of finding the intersection of two lines. They're either parallel, or
they're the same line, if the determinant is 0. Anyway, I will see you
in the next video.