Category of matrices

From HandWiki
Short description: Category whose objects are natural numbers and whose morphisms are matrices


In mathematics, the category of matrices, often denoted 𝐌𝐚𝐭, is the category whose objects are natural numbers and whose morphisms are matrices, with composition given by matrix multiplication.[1][2]

Construction

Let A be an n×m real matrix, i.e. a matrix with n rows and m columns. Given a p×q matrix B, we can form the matrix multiplication BA or BA only when q=n, and in that case the resulting matrix is of dimension p×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×m matrix to be of type mn, and similarly a p×q matrix to be of type qp. This way, when q=n the two arrows have matching source and target, mnp, and can hence be composed to an arrow of type mp.

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 𝐌𝐚𝐭 is constructed as follows:

  • It has natural numbers as objects;
  • Given numbers m and n, a morphism mn is an n×m matrix, i.e. a matrix with n rows and m columns;
  • The identity morphism at each object n is given by the n×n identity matrix;
  • The composition of morphisms A:mn and B:np (i.e. of matrices n×m and p×n) is given by matrix multiplication.

More generally, one can define the category 𝐌𝐚𝐭𝔽 of matrices over a fixed field 𝔽, such as the one of complex numbers.

Properties

  • The category of matrices 𝐌𝐚𝐭 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 n, and an n×m matrix to the corresponding linear map mn.[3][2] A possible interpretation of this fact is that, as mathematical theories, abstract finite-dimensional vector spaces and concrete matrices have the same expressive power.
  • A linear row operation on a n×m matrix A can be equivalently obtained by applying the same operation to the n×n identity matrix, and then multiplying the resulting n×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.[4][5]

Particular subcategories

  • For every fixed n, the morphisms nn of 𝐌𝐚𝐭 are the n×n matrices, and form a monoid, canonically isomorphic to the monoid of linear endomorphisms of n. In particular, the invertible n×n matrices form a group. The same can be said for a generic field 𝔽.
  • A stochastic matrix is a real matrix of nonnegative entries, such that the sum of each column is one. Stochastic matrices include the identity and are closed under composition, and so they form a subcategory of 𝐌𝐚𝐭.[6]

Citations

  1. โ†‘ Riehl (2016), pp. 4โ€“5
  2. โ†‘ 2.0 2.1 Perrone (2024), pp. 99โ€“100
  3. โ†‘ 3.0 3.1 Riehl (2016), p. 30
  4. โ†‘ Riehl (2016), pp. 60โ€“61
  5. โ†‘ Perrone (2024), pp. 119โ€“120
  6. โ†‘ Perrone (2024), pp. 302โ€“303

References