-
Let's learn about matrices. So, what is a, well, what I do I mean when I say matrices?
-
Well, matrices is just the plural for matrix.
-
Which is probably a word you're familiar with more because of Hollywood than because of mathematics.
-
So, what is a matrix? Well, it's actually a pretty simple idea.
-
It's just a table of numbers. That's all a matrix is.
-
So, let me draw a matrix for you.
-
I don't like that toothpaste colored blue, so, let me use another color.
-
This is an example of a matrix. If I said, I don't know I'm going to pick some random numbers;
-
Five, one, two, three, zero, minus five. That is a matrix.
-
And all it is is a table of numbers and, oftentimes if you want to have a variable for a matrix, you
-
use a capital letter. So, you could use a capital 'A'.
-
Sometimes in some books they make it extra bold. So it could be a bold 'A', would be a matrix.
-
And, just a little bit of notation, So, they would call this matrix. Or, we would call
-
this matrix, just by convention, you would call this a two by three matrix.
-
And, sometimes they actually write it '2 by 3' below the bold letter they use to represent the matrix
-
What is two? And, what is three?
-
Well, two is the number of rows. We have one row, two row. This is a row, this is a row.
-
We have three columns; one, two , three.
-
So, that's why it's called a two by three matrix.
-
When you say, you know, if I said, if I said that B, I'll put it extra bold.
-
If B is a five by two matrix, that means that B would have, I can, let me do one
-
I'll just type in numbers; zero, minus five, ten.
-
So, it has five rows, it has two columns.
-
We'll have another column here. So, let's see; minus ten, three,
-
I'm justing putting in random numbers here. Seven, two, pi.
-
That is a five by two matrix.
-
So, I think you'd now have a kind of a convention that all a matrix is is a
-
table of numbers. You can represent it when you're doing it in variable form
-
you represent it as bold face capital letter. Sometimes you'd write two by three there.
-
And, you can actually reference the terms of the matrix.
-
In this example, the top example, where we have matrix A.
-
If someone wanted to reference, let's say, this, this element of the matrix.
-
So, what is that? That is in the second row. It's in row two.
-
And, it's in column two. Right?
-
This is column one, this is column two. Row one, row two.
-
So, it's in the second row, second column.
-
So, sometimes people will write that A, then they'll write, you know
-
two comma two is equal to zero.
-
Or, they might write, sometimes they'll write a lowercase a,
-
two comma two is equal to zero.
-
Well, what is A? These are just the same thing.
-
I'm just doing this to expose you to the notation, because
-
a lot of this really is just notation.
-
So, what is a, one comma three?
-
Well, that means we're in the first row and the third column.
-
First row; one, two, three. It's this value right here.
-
So, that equals two.
-
So, this is just all notation of what a matrix is;
-
it's a table of numbers, it can be represented this way.
-
We can represent its different elements that way.
-
So, you might be asking
-
"Sal, well, that's nice, a table of numbers with fancy
-
words and fancy notations. But, what is it good for?"
-
And that's the interesting point.
-
A matrix is just a data representation. It's just a way of writing down data.
-
That's all it is. It's a table of numbers.
-
But, it can be used to represent a whole set of phenomenon.
-
And if you're doing this in you Algebra 1 or your Algebra 2 class
-
you're probably using it to represent linear equations.
-
But, we will learn, later, that it, and I'll do a whole set of videos
-
on applying matrices to a whole bunch of different things.
-
But, it can represent, it's very powerful and if you're doing
-
computer graphics, that matrixes...The elements can represent pixels on your screen,
-
they can represent points in coordinate space,
-
they can represent...Who knows!
-
There's tonnes of things that they can represent.
-
But, the important thing to realize is that a matrix
-
isn't, it's not a natural phenomenon.
-
It's not like a lot of the mathematical concepts we've been looking at.
-
It's a way to represent a mathematical concept.
-
Or, a way of representing values. But you kinda have to
-
define what it's representing.
-
But, lets put that on the back burner a little bit
-
in terms of what it actually represents.
-
And the, oh, my wife is here. She's looking for our filing cabinet.
-
But anyway, back to what I was doing.
-
So, so, lets put on the back burner what a matrix is
-
actually representing. Let's learn the conventions.
-
Because, I think, uhm, at least initially, that tends to be
-
the hardest part, How do you add matrices?
-
How do you multiple matrices? How do you invert a matrices?
-
How do you find the determinant of a matrix?
-
I know all of those words might sound unfamiliar. Unless,
-
you've already been confused by then in your algebra class.
-
So. I'm gonna teach you all of those things first.
-
Which are all really human-defined conventions.
-
And then, later on, I'll make a whole bunch of videos on the intuition behind them,
-
and what they actually represent. So, let's get started.
-
So, lets say I wanted to add these two matrices.
-
Let's say, the first one, let me switch colors. Let's say,
-
I'll do relatively small ones, just, not to waste space.
-
So, you have the matrix; three, negative one, I don't know,
-
two, zero. I don't know, let's call that A, capital A.
-
And let's say matrix B, and I'm just making up numbers.
-
Matrix B is equal to; minus seven, two, three, five.
-
So, my question to you is: What is A,
-
so I'm doing it bold like they do in the text books, plus
-
matrix B? So, I'm adding two matrices. And, once again
-
this is just human convention. Someone defined how matrices add.
-
They could've defined it some other way. But, they said;
-
we're gonna make matrices add the way I'm
-
about to show you because it's useful for a whole set of phenomenon.
-
So, when you add two matrices you essentially just add
-
the corresponding elements. So, how does that work?
-
Well, you add the element that's in row one column one with
-
the element that's in row one column one. Alright, so, it's
-
three plus minus seven. So, three plus minus seven.
-
That'll be the one-one element. Then, the row one column two element
-
will be minus one plus two.
-
Put parenthesis around them so you know that these are
-
separate elements. And, you could guess how this keeps going.
-
This element will be two plus three. This element, this last element will be zero plus five.
-
So, that equals what? Three plus minus seven, that is minus four.
-
Minus one plus two, that's one. Two plus three is five. And,
-
zero plus five is five. So, there we have it, that is how we humans have defined the addition of two matrices.
-
And, by this definition, you can imagine that this is going to be the same thing
-
as B plus A. Right? And remember, this is something we have to think about
-
because we're not adding numbers anymore. You know one plus two is the same as
-
two plus one. Or, any two normal numbers, it doesn't matter what order you
-
add them in. But matrices it's not completely obvious. But, when you define it in this way
-
it doesn't matter if we do A plus B or B plus A. Right?
-
If we did B plus A, this would just say negative seven plus three.
-
This would just say two plus negative one. But, it would come out to the same values.
-
That is matrix addition.
-
And, you can imagine, matrix subtraction, it's essentially the same thing.
-
We would...Well, actually let me show you. What would be A minus B?
-
Well, you can also view that, this is capital B, it's a matrix
-
that's why I'm making it extra bold. But, that's the same thing as;
-
A plus minus one, times B. What's B? Well, B is;
-
minus seven, two, three, five. And, when you multiply
-
a scalar, when you just multiply a number times the matrix,
-
you just multiply that number times every one of its elements.
-
So, that equals A, matrix A, plus the matrix, we just multiply
-
the negative one times every element in here. So, seven,
-
minus two, minus three, five. And then we can do
-
what we just did up there. We know what A is. So,
-
this would equal, let's see, A is up here. So, three plus
-
seven is ten, negative one, plus negative two is minus three,
-
two plus minus three is minus one and zero plus five is five.
-
And, you didn't have to go through this exercise right here.
-
You could have, literally, just subtracted these elements from these elements
-
and you would have gotten the same value.
-
I did this because I wanted to show you also that multiplying
-
a scalar times, or just a value or a number, times a matrix
-
is just multiplying that number times all of the elements of that matrix.
-
And, so what...By this definition of matrix addition what do we know?
-
Well, we know that both matrices have to be the same size,
-
by this definition of the way we're adding. So, for example
-
you could add these two matrices, You could add, I don't know,
-
one, two, three, four, five, six, seven, eight, nine to this matrix;
-
to, I don't know, minus ten, minus one hundred, minus one thousand.
-
I'm making up numbers. One, zero, zero, one ,zero, one.
-
You can add these two matrices. Right?
-
Because they have the same number of rows and the same number of columns.
-
So, for example, if you were to add them. The first term up here would be one plus minus ten,
-
so, it would be minus nine. Two plus minus one hundred, minus ninety-eight.
-
I think you get the point. You'd have exactly nine elements and you'd have three rows of three columns.
-
But, you could not add these two matrices. You could not add...
-
Let me do it in a different color, just to show it is different,
-
You could not add, this blue, you could not add this matrix;
-
minus three, two to the matrix; I don't know, nine, seven.
-
And why can you not add them?
-
Well, they don't have corresponding elements to add up.
-
This is a one row by two column, this is one by two
-
and this is two by one. So, they don't have the same dimensions
-
so we can't add or subtract these matrices.
-
And, just as a side note, when a matrix has...when one of its
-
dimensions is one. So, for example, here you have one row
-
and multiple columns. This is actually called a row vector.
-
A vector is essentially a one dimensional matrix, where one
-
of the dimensions is one. So, this is a row vector and similarly,
-
this is a column vector. That's just a little extra terminology
-
that you should know. Uhm, if you take linear algebra and calculus
-
your professor might use those terms and it's good to be
-
familiar with it. Anyway, I'm pushing eleven minutes, so I will continue this in the next video. See you soon.