Category of matrices explained

In mathematics, the category of matrices, often denoted

Mat

, is the category whose objects are natural numbers and whose morphisms are matrices, with composition given by matrix multiplication.

Construction

Let

A

be an

n x m

real matrix, i.e. a matrix with

n

rows and

m

columns. Given a

p x q

matrix

B

, we can form the matrix multiplication

BA

or

B\circA

only when

q=n

, and in that case the resulting matrix is of dimension

p x m

.

In other words, we can only multiply matrices

A

and

B

when the number of rows of

A

matches the number of columns of

B

. One can keep track of this fact by declaring an

n x m

matrix to be of type

m\ton

, and similarly a

p x q

matrix to be of type

q\top

. This way, when

q=n

the two arrows have matching source and target,

m\ton\top

, and can hence be composed to an arrow of type

m\top

.

This is precisely captured by the mathematical concept of a category, where the arrows, or morphisms, are the matrices, and they can be composed only when their domain and codomain are compatible (similar to what happens with functions). In detail, the category

MatR

is constructed as follows:

m

and

n

, a morphism

m\ton

is an

n x m

matrix, i.e. a matrix with

n

rows and

m

columns;

n

is given by the

n x n

identity matrix;

A:m\ton

and

B:n\top

(i.e. of matrices

n x m

and

p x n

) is given by matrix multiplication.

More generally, one can define the category

MatF

of matrices over a fixed field

F

, such as the one of complex numbers.

Properties

MatR

is equivalent to the category of finite-dimensional real vector spaces and linear maps. This is witnessed by the functor mapping the number

n

to the vector space

Rn

, and an

n x m

matrix to the corresponding linear map

Rm\toRn

. A possible interpretation of this fact is that, as mathematical theories, abstract finite-dimensional vector spaces and concrete matrices have the same expressive power.

MatF

is equivalent to the category of finite-dimensional vector spaces over the field

F

and

F

-linear maps.

n x m

matrix

A

can be equivalently obtained by applying the same operation to the

n x n

identity matrix, and then multiplying the resulting

n x n

matrix with

A

. In particular, elementary row operations correspond to elementary matrices. This fact can be seen as an instance of the Yoneda lemma for the category of matrices.

Particular subcategories

n

, the morphisms

n\ton

of

MatR

are the

n x n

matrices, and form a monoid, canonically isomorphic to the monoid of linear endomorphisms of

Rn

. In particular, the invertible

n x n

matrices form a group. The same can be said for a generic field

F

.

MatR

.

References

External links