# Matrix Multiplication

## Homework Statement

I can't figure out how to latexa 3X3 matrix so here's my ghetto method

A =
0 0 -1
0 2 0
0 0 1

What is

## Homework Equations

I'm trying to find $$A^{7}$$

## The Attempt at a Solution

I'm assuming there's some type of shortcut to get this... So I did a squared and then multipled a squared times a squared to get a to the fourth... I was about to multiply A times a squared and then that times a to the fourth but I didn't think that was ok to do since multiplication isn't commutative and I don't know which order to multiply... Is my method ok? Any other suggestions?

## Answers and Replies

you should look for which numbers stay the same regardless of the number of times you multiply it. There are some other elements that stay the same. Which?

Last edited:
Hurkyl
Staff Emeritus
Science Advisor
Gold Member
I didn't think that was ok to do since multiplication isn't commutative
In general it's not... but can you prove that it is in this case?

I don't know which order to multiply...
What does the definition of exponentiation say?

Oops I screwed up on the original posting...

so the matrix is

0 0 -1
0 2 0
2 0 0

And I don't really see any repetition at all which was what I was hoping would happen... For A squared I got

-2 0 0
0 4 0
0 0 -2

Then for A^4 I get

4 0 0
0 16 0
0 0 4

So there's no really observable pattern that I can see except for the fact that A^2 and A^4 so A^4 is all the values from A^2 squared... But now when I go to start multiplying things that aren't the same I don't know which order to do it in...

I don't know what the deff. of exponentiation is... Exponentiation for matrix's or in general? This is the very beginning of my lin alg class...

Hurkyl
Staff Emeritus
Science Advisor
Gold Member
I don't know what the deff. of exponentiation is... Exponentiation for matrix's or in general? This is the very beginning of my lin alg class...
Exponentiation for matrices. Your text should either precisely explain the order of operations, or indicate why the order shouldn't matter. (And if it doesn't, it ought to. :tongue:)

The order, in fact, doesn't matter -- and I think it would be a good exercise for you to try and figure out why. Start with an easy case -- e.g. show that

M(MM) = (MM)M

for any square matrix M.

In general. Well, for nonnegative integer exponents anyway.

I guess that makes sense since it's the same matrix. My sucky book doesn't have anything under exponentiation in the index but it may be in there, just not in the beginning sections were in right now. Thanks for the help, I finished the problem.

HallsofIvy
Science Advisor
Homework Helper
Your "sucky" book probably assumed that you had taken basic algebra, at least enough to know what "exponentiation" meant, before taking linear algebra.

Hurkyl
Staff Emeritus
Science Advisor
Gold Member
Your "sucky" book probably assumed that you had taken basic algebra, at least enough to know what "exponentiation" meant, before taking linear algebra.
Linear algebra is the first time most people encounter a non-commutative multiplication operator, and are expected to be paying careful attention to their products to make sure they don't accidentally misapply a theorem of commutative arithmetic. I think it's fair to demand that an introductory textbook at least state explicitly that the intuitive definition of exponentiation as "repeated multiplication" is well-defined, and can be computed in any order.

hello,
i don't understand about matrix multiplication especailly in writing an M-files codes.Hope anyone can help me..:(

I think most of the people on this forum are very helpful if you are able to ask a specific question... Are you asking how to make an m file that will multiply two matrices? If so, it is a reatively long process. Is there a specific part you are having difficulties with?

actually,i was asked to write a matlab function that multiplies matrices A and B using nested for loops......since i don't really understand about for loops and while,i can't write it.