# What is an array of arrays called when all arrays have the same size?

If I have an array a of arrays, in many languages they may have different size. Is there a word for an array of arrays where all the arrays have the same length?

Edit: An array of arrays may have the following form:

[
[ 1, 2, 3 ]
[ 1, 2, 3, 4 ]
[ 1, 2 ]
]


But in order to convert this to a matrix you would have to assume some default value or trim the arrays. The following array of arrays is possible to convert into a matrix without any asumptions or trimming as all arrays have same length.

[
[ 1, 2, 3, 4 ]
[ 1, 2, 3, 4 ]
[ 1, 2, 3, 4 ]
]


Is there some name or classifier for a matrix of this kind?

• a matrix, a table? Aug 12, 2015 at 10:34
• I'm simply wondering if there is a classifier or name for an array of arrays where all the contained arrays are of same length. In for instance C# one may have an array of arrays, and each of the contained arrays may have a different size. An array like that would be possible to convert into a matrix without assuming some default value, but would still be different from a matrix.
– tba
Aug 12, 2015 at 11:24
• An array of arrays is just, surprise, "an array of arrays". You may also call it a multidimensional array. We cannot make up names for everything, and when a simple expression will do, why bother. How do you call a man who is tall, with curly hair and blue pants? There are probably millions, but no special name. Actually, we create names for new structure with specific properties. It is not really needed in your case. ... Unlike you enjoy reading names of molecules, which can fill a whole line (but there is a reason in that case). Aug 12, 2015 at 12:48
• @babou but s/he doesn't need simple "an array of arrays" but "an array of arrays called when all arrays have the same size" Sep 5, 2015 at 22:26

In C# world there are 2 kinds of array declarations, and 2 names for it:

1. Jagged:
[
[ 1, 2, 3 ]
[ 1, 2, 3, 4 ]
[ 1, 2 ]
]

1. Rectangular:
[
[ 1, 2, 3, 4 ]
[ 1, 2, 3, 4 ]
[ 1, 2, 4, 4 ]
]


An array of arrays, also known as a multi dimensional array :-)

A Matrix is only one of the structures that can be represented by such an array, when all first level elements are of the same size.

I don't think there is a term for this (a "multidimensional array" may or may not be the same thing) but I'm familiar with a term for the opposite: a "ragged array".

I believe "rectangular array" is the most common term and one people aren't likely to misunderstand.

• It might be three-dimensional, or even more... and that's not a "rectangle" anymore. Aug 12, 2015 at 20:13