Maths - Vector Space Monad

Endofunctors

We have already described (on this page) a Transformation as a mapping from the points in a vector space back to itself.

endofunctor in vector space
A transform maps every point in space to a (possibly) different point. This type of function, that maps something back to itself, is known as an 'endofunction' rotation

There is a difference, in concept, between the two diagrams above. The top diagram is a mapping between a whole algebra (vector space) back to itself. The bottom diagram shows a mapping between elements of an algebra (points) back to those elements.

When we are dealing with functions between whole algebras (functors) like this, we can use a branch of mathematics known as category theory. This allows us to discover some general properties of transformations.

Natural Transformations

This concept of an endofunction is very powerful because it allows us to compose it indefinitely, that is, we can apply it over and over again and each time we will get a transformation as the result. In mathematical terminology: it is 'closed'.

So what types of transformation are there? The first is the identity ('Id' or '1'), which is the same as doing nothing, this may not seem very useful but it is an important concept in the higher order algebra of vector space transformations. It is like multiplying by one.

There are also two 'natural transformations', these are mappings between transformations that obey certain axioms, these two natural transformations are:

Together the endofunctor and natural transformations form a monad which then allows us to define a higher order algebra of transformations (in fact several algebras).

The first natural transformation 'unit' denoted by the symbol 'η' (the Greek lower case eta) is a mapping from the identity to a transform: 1 -> T. When we apply this to a point 'p' then we get: p -> T p. So unit just introduces a transformation.

The second natural transformation 'multiplication' denoted by the symbol 'µ' (the Greek lower case mu) is a mapping from a transform applied twice (T²) to a single transform. This is just an encoding of the 'closure' principle, that is, if we apply a transformation and then apply another transformation then that is equivalent to some single transformation.

Properties of Vector Space Transformations

So far we have not said anything about what type of transformation that we are discussing (Rotation, Scaling, Reflection, Translate, Shear and so on), we don't need to, these are completely general and apply to all of these.

For this endofunctor and natural transformations to form a monad it must obey some axioms which expressed in category theory diagrams are:

associative square: unit triangles:
monad square monad triangle

This looks complicated, if you are not used to category theory diagrams, but it is just encoding two simple principles:

Since these axioms apply to transformations, we have a valid monad.

Higher order Algebras

From this monad we can construct a whole category of higher order algebras with two extremes:

  • The Eilenberg-Moore algebra (CT) is terminal in this category of algebras. It has different objects but the same arrows as C.
  • The Kleisli algebra is initial (CT)in this category of algebras. It has the same objects but different arrows as C.
monad algebras

Eilenberg-Moore Algebra

If 'A' and 'B' are objects in the vector space category, that is, points and 'T' is a transform on those points. Then the Eilenberg-Moore algebra for vector space has:

So objects in this algebra are the transformations, rather than the underlying points or vectors. The arrows allow us to combine them, for instance, we might multiply square matrices or quaternions to calculate the result of composition of two transformations.

Kleisli Algebra

If 'A' and 'B' are objects in the vector space category, that is points and 'T' is a transform on those points. Then the Kleisli algebra for vector space has:

So objects in this algebra are the underlying points or vectors. The arrows are now more complicated, we might multiply the matrix by a vector or quaternion sandwich product to calculate the result of transformations on actual points.

Types of Transformation

 

 

 

 

 

 


metadata block
see also:

 

Correspondence about this page

Book Shop - Further reading.

Where I can, I have put links to Amazon for books that are relevant to the subject, click on the appropriate country flag to get more details of the book or to buy it from them.

cover 3D Math Primer - Aimed at complete beginners to vector and matrix algebra.

Other Math Books

This site may have errors. Don't use for critical systems.

Copyright (c) 1998-2023 Martin John Baker - All rights reserved - privacy policy.