Lie Group Derivatives
Introduction
This document provides some mathematical background on Lie groups and Lie
algebras. In particular, this document covers how differentiation works on Lie
groups, the Lie group exponential, left and right tangent spaces, the adjoint
representations of a Lie group and its algebra, and the chain rule for Lie groups.
Differentiating Curves on Lie Groups
By definition, a Lie group is any differentiable manifold which is also a
group. A differentiable manifold is not generally
diffeomorphic to Euclidean space
(e.g. ), but it is locally diffeomorphic to Euclidean space in the
sense that we can define a diffeomorphism with in the neighborhood of any
point in our group . We don't know how to take derivatives directly on
the group , but we do know how to do this on Euclidean space. So we define
the derivative with respect to a particular choice of in the
neighborhood of the point where we're taking the derivative. For a
trajectory with , this looks like:
Since is just a function from to ,
we can take its derivative in the standard way, and the typical properties of
derivatives (e.g. the chain rule) all apply. We just need to come up with a
consistent way of picking for whatever point we're at. For a Lie
group, one way we can do this is to first define for the identity
element and then we can define in the neighborhood of any
point , since Lie group elements are guaranteed to have an inverse. We can do
this like so:
So our derivative at a point along our trajectory is given by:
This happens to be a nice choice for for each point because it has
a property called left invariance. This means that the derivative is the same
for a curve that is left multiplied by a constant element of . Say that
we're differentiating for constant and
. In this case, and we have:
Which demonstrates the left invariance.
Lie Group Exponential
Now, let's define a curve with the properties
that as defined above is constant at all points
along the curve and that . We claim without proof that it's
possible to uniquely define such a curve. If we define for some in the range of , then we can conclude that
because also goes through
the origin (at ) and has the same constant value for
. Therefore, the curves have the same range, and
is also a member of the range of . We can do this
for any in the range of . We can conclude that the range
of is a subgroup of because it contains the identity, every element
in the subgroup has an inverse, and it is closed under composition with other
members of the subgroup. This is called a one parameter subgroup of .
Now, we can go further by defining the Lie Group Exponential as the function
satisfying where
is defined as above with . In other terms,
the exponential tells you where you end up if you follow the same constant
derivative for one unit of time through the Lie group. The standard exponential
on real numbers falls out of this definition if you consider curves with
constant derivatives that intersect the multiplicative identity:
With some rearrangement and variable substitution:
which has a known solution . Therefore, the Lie group exponential
can be interpreted as a natural extension of the familiar concept of the
exponential. In fact, for matrix Lie groups (Lie groups which have a matrix
representation), the Lie group exponential is identical to the matrix
exponential. Furthermore, just as the ordinary exponential has an inverse, the
logarithm, there is a Lie group logarithm, which is the inverse of the Lie group
exponential. Conceptually, the logarithm tells you "what constant velocity would
I have to move at to arrive at this point in one unit of time from the origin."
It's worth noting that is not formally the input to the
exponential. The domain of the exponential is actually called the Lie
Algebra corresponding to the Lie group . It is a vector
space and hence it is homeomorphic to , so we casually treat them
as interchangeable.
The exponential and logarithm define a correspondence between the Lie group and
a vector space called the Lie algebra. This connection allows us
to leverage much of the mathematics derived in vector spaces on Lie groups which
can be incredibly powerful. For instance, one can define a Gaussian probability
distribution on the Lie algebra and take the exponential of
samples from it to sample orientations in the Lie group . Because
they are commonly useful, we provide implementations of the exponential and
logarithm for each Lie group we implement.
Left and Right Tangents
So far, we have been working with the left invariant definition for the
derivative:
However, we've been very vague about what we may pick for . We know
it needs to be a diffeomorphism defined in an open set around . It turns out
that the Lie group logarithm is a reasonable choice for this, so this is what we
use. Hence:
As noted before, this definition is left invariant since we can multiply on the
left by any member of the group without changing the value of the
derivative. This is practically quite useful because if represents a
transform of world_from_robot
as a function of time, it doesn't actually
matter where we decide the "world" frame is when we're computing derivatives as
long as our choice does not move relative to some agreed-upon world frame
(remember that must be constant for the above to work. Confusingly, although
this choice for yields left invariance, is often
referred to as the "right tangent" or "right tangent space derivative" of
. This is because it can also be defined in terms of the right perturbation
to that the trajectory is "following" at that moment.
which when rearranged gives:
In the limit as , we get:
which is equivalent to what we had before. For this reason, we henceforth refer
to this definition of as . The reason for the special
notation, is that we could equally well have chosen:
As before, is in the neighborhood of the identity when is in
the neighborhood of , so this works. With this, we get:
is often referred to as the "left tangent" or "left tangent
space derivative" of , and one can verify that it can be defined in terms of
a left perturbation to that the trajectory is following and that it has a
right invariance property such that multiplying the trajectory on the
right by a constant element of the group does not affect its value.
In summary, we have left and right tangent space derivatives that have right and
left invariance respectively.
The Adjoint
In practice both the left and right tangent space derivatives happen to be
useful in particular cases, so one might ask if it's possible to easily convert
between the right tangent of a trajectory and the left tangent of the
trajectory. If we want the left tangent space derivative, we can see:
Applying the chain rule to where and are both functions to and from Euclidean space, we have:
so we can convert from right to left tangent space by multiplying by this
Jacobian matrix:
where we define this Jacobian to be the adjoint representation of the element
. Technically, the adjoint representation is the map that produces such
matrices given inputs from . This map can also be defined as the derivative
of a curve at the identity. Since this is a map from to
, one can show this by assuming that is a curve passing through the
identity and using the chain rule as above to find what
is. There are a number of properties that the adjoint has that are worth noting:
which is basically just a reminder that the adjoint is a representation of
G. In the case where the Lie group has a matrix representation (which is true
for all the Lie groups we use), one can simplify our definition to be:
for any in the Lie Algebra of . Note that this is a matrix
representation of the Lie algebra element, not just a vector in
. Expressions for are derived for all the Lie groups
we implement since it is so commonly needed.
It's often the case that we need to take the derivative of with
respect to time. We define the adjoint representation of the algebra
based on a curve going through the identity.
It doesn't matter whether we use the right or left tangent space derivative here
for since they are equivalent at the identity, as one can verify by
inspecting their definitions. The algebra adjoint is related to the Lie bracket:
For matrix Lie groups, the bracket is the commutator on the matrix
representation of algebra elements.
The algebra adjoint is somewhat commonly used, so we provide it as a static
member function in our Lie group objects.
The Chain Rule
Let's look at how one might differentiate the composition of two Lie group
elements in right tangent space, as an example. In other words, take the time
derivative of :
To help ourselves, let's define a function like so:
where and are functions of . Taking the
derivative with respect to with the multivariable chain rule gives:
Of course, the derivative of is useful to us if so:
which is the chain rule in the right tangent space. There is also a chain rule
for the left tangent space:
One can verify the left and right invariance properties using these expressions
and assuming one of the group elements is constant.