# Matrices in more than 2 dimensions

#### The Rev

I've been learning about 2D matrices in algebra, like the one below, and was wondering if there were matrices in higher maths that used 3 or more dimensions, and if someone would describe or provide an example. Just curious.

$$\left[\begin{array}{ccc}1&0&0\\0&1&0\\0&0&1\end{array}\right]$$

Thanks.

$$\psi$$

The Rev

Homework Helper
The matrix above is called the identity matrix. Furthermore, it's a 3-rd order square matrix. In general, a matrix can be of the order (m,n) , where m is the number of rows and n the number of columns. I guess we could call this 3-rd order a 3-d matrix, because it's columns or rows can be interpreted as vectors in space. The same goes for matrixes of higher order, but we cannot 'draw' these vectors in space - the function of these vectors is important in solving linear albegar equations.

#### HallsofIvy

Homework Helper
But what the Rev is asking about is a "matrix" that would be a cube of numbers rather than a square. That is, with an underlying 3 dimensional space, 3 layers, each consisting of 3 rows and 3 columns: 27 numbers.

Yes, such things do exist but I think it would be more appropriate to call it an "array" rather than a matrix- matrices assume specific laws for addition and multiplication that would not apply here. With a given coordinate system, a third order tensor could be represented by such an array.

#### The Rev

I was thinking of a matrix like the one above, with rows and columns (x & y vertices) AND some kind of z vertex (depths?) so the matrix formed a cube instead of a square (or a hypercube, etc.). Is this what you mean? (I'm inferring from your post that you're a few textbooks ahead of where I am in your math studies, so don't be shy about dumbing down your responses. ).

$$\psi$$

The Rev

#### The Rev

HallsofIvy said:
But what the Rev is asking about is a "matrix" that would be a cube of numbers rather than a square. That is, with an underlying 3 dimensional space, 3 layers, each consisting of 3 rows and 3 columns: 27 numbers.

Yes, such things do exist but I think it would be more appropriate to call it an "array" rather than a matrix- matrices assume specific laws for addition and multiplication that would not apply here. With a given coordinate system, a third order tensor could be represented by such an array.
Tensors, eh? Well, that's a ways off. Thanks!

$$\psi$$

The Rev

#### Hurkyl

Staff Emeritus
Gold Member
An interesting thing, though, is that 2-D arrays can be good enough to do things that would seem more natural to do with a higher dimensional array.

For example, suppose I have a collection of n matrices and n vectors. The n matrices would be most naturally represented by a three dimensional array, but if the thing I'm most interested is the sum A1 v1 + A2 v2 + ... + An vn, then this partitioned matrix is good enough:

[A1 | A2 | ... | An] [v1 | v2 | ... | vn]^T

In other words, the matrix on the left is formed by placing the individual matrices side by side, and the vector on the right is formed by stacking the individual vectors on top of each other.

Note that we may think of the one on the left as being a row vector whose entries are matrices, and the one on the right being a column vector whose entries are column vectors!

### Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving