Reverted back to Anonymous’s version, and added a mention of infinite matrices.

]]>I do not like ’list of lists’ as there would also be confusion between being it a list of the rows and a list of the columns in the normal way of ’drawing’ a matrix. The definition suggested by the anonymous contributor has the advantage that it is independent of the way one writes down the ’matrix’. Of course, one can Curry that definition to get $M:[n]\to X^{[m]}$, and so on.

]]>I don’t think it’s even correct to say that a matrix is a list of lists; that would include things like $[[1,2],[3],[4,5,6]]$ whereas I’ve never heard of a “matrix” being anything other than rectangular, with all sub-lists of the same length.

A different direction of generalization, however, is that matrices don’t have to be finite; in some contexts it makes sense to call any function out of a cartesian product set a “matrix”. In a context with “infinite sums”, like objects of a cocomplete category, we can even “multiply” such infinite matrices, leading for instance to the bicategory of matrices of objects in a cocomplete closed monoidal category.

]]>It can always say both, but yes surely the rectangular array first.

]]>That anonymous has a good point here and I suggest we do re-edit the entry as they did.

The only place that I have ever seen where a matrix is not defined as a rectangular array, but as a list of lists, … our nLab entry. I don’t think it’s right to say this. (Is it a computer science thing, maybe?) Certainly not without at least mentioning the actual definition that the rest of the world is using.

]]>Anonymous “helpfully” changed the statement

A

matrixis a list of lists.

to

A

matrixis a function $M:[n]\times[m]\rightarrow X$ from the Cartesian product $[n]\times[m]$ to a set $X$.

which I have reverted back.

]]>