pragmatist comments on Stupid Questions September 2016 - Less Wrong

3 Post author: pepe_prime 05 September 2016 10:34PM

You are viewing a comment permalink. View the original post to see all comments and the full post content.

Comments (33)

You are viewing a single comment's thread. Show more comments above.

Comment author: DataPacRat 10 September 2016 02:30:07AM 3 points [-]

Matrix multiplication

Could somebody explain to me, in a way I'd actually understand, how to (remember how to) go about multiplying a pair of matrixes? I've looked at Wikipedia, I've read linear algebra books up to where they supposedly explain matrixes, and I keep bouncing up against a mental wall where I can't seem to remember how to figure out how to get the answer.

Comment author: pragmatist 11 September 2016 02:34:02PM *  1 point [-]

Perhaps explicitly thinking of them as systems of equations (or transformations on a vector) would be helpful.

As an example, suppose you are asked to multiply matrices A and B, where A is [1 2, 0 4, -1 2] (the commas represent the end of a row) and B is [2 1 0, 3 1 2]. Start out by taking the rightmost matrix (B in this case) and converting it into a series of equations, one for each row. So since the first row is 2 1 0, the relevant equation will be 2x + 1y + 0z. Assign each of these equations to some other variable. So we now have

X = 2x + y

Y = 3x + y + 2z

Now do the same thing with the matrix on the left, except this time use the new variables you've introduced (X and Y), so the three equations you end up with (one for each row) will be

X + 2Y

4Y

-X + 2Y

Now that you have these formulae, substitute in the values of X and Y based on your earlier equations. You get

(2x + y) + 2(3x + y + 2z)

4(3x + y + 2z)

-(2x + y) + 2(3x + y + 2z)

Simplifying, you get

8x + 3y + 4z

12x + 4y + 8z

4x + y + 4z

The coefficients of these equations are the result of the multiplication. So the product of the two matrices is [8 3 4, 12 4 8, 4 1 4].

I'll admit this is not the quickest way to go about multiplying matrices, but it might be easier for you to remember since it doesn't seem as arbitrary. And maybe once you get used to thinking about multiplication this way, the usual visual rule will start making more sense to you.