Matrices

Introduction

OK, I admit, this is just an excuse to try out the LaTeX commands in StackEdit and see if they render nicely in Blogger (the blogging site previously known as BlogSpot). So, let’s get into it:

What is a Matrix?

Effectively, it’s just a multi-dimensional array of numbers. It’s commonly used to represent vectors in cartesian space.

Often matrices are represented by bold capital letters. e.g.:

Addition

Adding and subtracting matrices isn’t too different to adding scalar numbers. To add matrices together, they must be the same shape. That means the same number of rows and columns.

If we wanted to add together the following:

We’d just add each number to it’s corresponding number in the other matrix.

Subtracting is exactly the same, just subtract the numbers instead.

Important: Not all matrices can be added together. In order to add (or subtract) two matrices they must have the same dimensions.

E.g.:

Multiplication

Scalar Multiplication

Multiplying a matrix by a scalar is even more trivial than adding matrices together.

Multiplying two matrices

Multiplying matrices is a little more involved than addition and subtraction. We have to multiply each row in the first matrix with each column in the second matrix. Let’s start with two small matrices of size .

Multiplying each row on the left by each column on the right give us:

We can also multiply matrices of different dimensions:

Notice that has different sized dimensions than . This highlights some very important properties of matrix multiplication.

  • The the number of rows in is equal to the number of rows in and the number of columns is equal to the number of columns in .

More generally:

If we look at from above then we can compare them easier (without having to scroll up and down). We’ll rearrange the coefficients too to make it a bit clearer.

It’s now plain to see that:

  • Finally, the number of rows in must equal the number of columns there are in . If this is not the case then the result is undefined.

No comments:

Post a Comment