It’s Professor Dave, let’s add matrices.
We now know what matrices are.
They are simply arrays of numbers, that are often meant to represent the coefficients
and constants from a system of linear equations.
We learned about how to manipulate these to solve such a system of linear equations.
But for a little bit, let’s look at matrices on their own, and describe some terminology
we can apply to them, as well as some simple operations we can do with multiple matrices,
starting with simple matrix addition.
First, let’s cover some definitions that may come in handy.
We know that any matrix will have some number of rows and some number of columns.
If the number of rows and columns is the same, that is called a square matrix.
In a square matrix, the entries going from the top left down to the bottom right comprise
the main diagonal of the matrix.
We can refer to a matrix as a whole as a diagonal matrix if all the entries that are not part
of the diagonal are zero.
This is the situation we are trying to get to with an augmented matrix when performing
Gauss-Jordan elimination, where all the entries on the main diagonal are one, and the rest
are zero, apart from the rightmost column, and if we are just looking at a coefficient
matrix that looks like this, we can also call this an identity matrix.
Then some other possibilities; a square matrix is called an upper triangular matrix if all
the entries below the main diagonal are zero, and it is called a lower triangular matrix
if the opposite is true, with the entries above the main diagonal all equal to zero.
There are also matrices consisting of just one row or column, and these have special
names.
A matrix with a single column is called a vector.
A matrix with a single row is called a row vector.
Typically, when using the word vector in this context, a column is being specified.
It is common to list the solution of a system of linear equations as a vector in this manner,
such as the following, which clearly shows the values of X, Y, and Z.
We can even represent systems of linear equations themselves using vectors.
Take this system of two equations, three X plus Y equals seven, and X plus two Y equals four.
Apart from generating an augmented matrix, we could use individual vectors to represent
the coefficients for each variable.
First, we generate three separate matrices, one with the X terms, plus the second with
the Y terms, and the third with the constants on the other side of the equals sign.
Then, we take X and Y out of the first two, and we are left with the vector seven, four,
as being the sum of a scalar multiple of three, one, and a scalar multiple of one, two.
This is called the vector form of the linear system.
This also outlines some basic operations we can perform with matrices.
Given that we pulled a scalar out of two matrices to do this, we can also do the reverse, and
perform scalar multiplication.
This is very simple.
If we have a scalar times a matrix, we just multiply every entry in that matrix by the
scalar.
So if we have two times this matrix, we just double all the entries, which will work the
same way regardless of the dimensions of the matrix.
But we can also add two entire matrices together.
In order for this to work, the two matrices must have identical dimensions.
That means the same number of rows and the same number columns.
The reason this is the case is that in order to add two matrices together, we just generate
a new matrix, and each entry is simply the sum of the entries for that specific position
in the other two matrices.
Take for example the following two by three matrices, one, two, three, four, five, six,
and then seven, three, one, five, three, negative one.
The sum of these matrices will be a new two by three matrix.
For the first entry, we add one and seven to get eight.
For the next entry, we add two and three to get five.
We continue in this manner to get four, nine, eight, and five, and this new matrix is the
sum of the first two.
Now it should be clear why we can only add matrices together that have identical dimensions,
because every entry in one of the matrices in the sum must have a corresponding entry
in the other matrix in the sum.
Matrix subtraction works precisely the same way, we will simply perform subtraction to
find each entry rather than addition.
Of course, just as when we learned these simple arithmetic operations at the beginning of
this series, addition is commutative, so matrix addition is also commutative.
The order in which the matrices are added doesn’t matter.
But subtraction is not commutative, and matrix subtraction is also not commutative.
Subtracting one matrix from the other will give us a different result than if we switch
the order.
But this fact should be quite intuitive, and with these operations understood, let’s
check comprehension.