In the APL array model, a matrix (sometimes table) is an array with rank 2. While matrices are named after the objects in linear algebra, which are multiplied using the matrix product, APL matrices do not have to be used in this way: they can store arbitrary data like any other array.
Rank 2 is the smallest rank for which multidimensional array theory offers an advantage over one-dimensional lists. Unlike vectors, Transpose on matrices changes the order of data, although there is only one possible transpose so dyadic Transpose is never needed. The ravel order of a matrix has two possible definitions; APLs choose to keep the rows together (row major order) rather than the columns (column major).
|APL features |
|Syntax||Array ∙ Function ∙ Operator ∙ Assignment|
|Built-ins||Primitive function ∙ Primitive operator ∙ Quad name|
|Array model||Shape ∙ Rank ∙ Depth ∙ Bound ∙ Index ∙ Axis ∙ Ravel ∙ Ravel order ∙ Element ∙ Scalar ∙ Vector ∙ Matrix ∙ Simple scalar ∙ Simple array ∙ Nested array ∙ Box ∙ Cell ∙ Major cell ∙ Subarray ∙ Empty array ∙ Prototype|
|User definition||Tradfn ∙ Dfn ∙ Tacit|
|Concepts and paradigms||Leading axis theory ∙ Scalar extension ∙ Conformability ∙ Scalar function ∙ Glyph ∙ Identity element|
|Errors||LIMIT ERROR ∙ RANK ERROR|