methods in computer vision: introduction to matrix lie groupsmcv172/wiki.files/leclie.pdf ·...

46
Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science, Ben-Gurion University June 14, 2017 June 14, 2017 1 / 46

Upload: truonghanh

Post on 23-Aug-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Methods in Computer Vision:Introduction to Matrix Lie Groups

Oren FreifeldComputer Science, Ben-Gurion University

June 14, 2017

June 14, 2017 1 / 46

Page 2: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups Definition and Basic Properties

Definition (Matrix Lie groups)

Let n be a fixed positive integer. A matrix Lie group is a set G of n× nmatrices together with the binary operation of matrix product on G (thatis, the domain is G×G) such that:

(G1) In×n ∈ G;

(G2)A,B ∈ G⇒ AB ∈ G;

(G3)A ∈ G⇒ A−1 exists, A−1 ∈ G. (note AA−1 = A−1A = I)

Matrix Lie groups are also called matrix groups, the terms beingidentical. It is possible to use a similar definition for matrix Lie groupswhose elements take complex values; however, we restrict the discussionto real-valued matrix Lie groups.

June 14, 2017 2 / 46

Page 3: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups Definition and Basic Properties

Let G be a matrix group. Basic linear algebra shows that:

(G4)A ∈ G⇒ AIn×n = In×nA = A(G5)A,B,C ∈ G⇒ (AB)C = A(BC) = ABC(G6)A ∈ G⇒ AA−1 = A−1A = In×n.

June 14, 2017 3 / 46

Page 4: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups Definition and Basic Properties

What (G1) through (G6) imply is that the set G, together with thebinary operation of matrix product, is a group and that In×n is theidentity element of the group. So unsurprisingly, every matrix group is agroup. When n is understood from the context, we will sometimesdenote the identity matrix by I instead of In×n.

June 14, 2017 4 / 46

Page 5: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups Definition and Basic Properties

If G is a set of n× n matrices, which may or may not form a matrixgroup once taken together with matrix product, it may be the case thatthere is some other binary operation, denoted by, say, : G×G→ G,such that the pair (G, ) forms a group. This group, however, is not amatrix group, although it is a “group of matrices”. E.g., if G is n× nmatrices and is matrix addition, than the group (G, ) is not a matrixgroup.

June 14, 2017 5 / 46

Page 6: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups Definition and Basic Properties

Henceforth, by a slight abuse of notation, we will write expressions suchas “G is a matrix Lie group”, with the convention that we will meanthat the set G, together with matrix product, is a matrix Lie group.Similarly, we will write “the matrix Lie group G is given by the followingset”, meaning that the set, together with matrix product, defines thematrix Lie group of interest.

June 14, 2017 6 / 46

Page 7: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups Definition and Basic Properties

Definition (The difference between two elements in a matrix Lie group)

Let G be a matrix Lie group, and let A and B be in G. The groupdifference of A and B is given by A−1B; it is not symmetric.

Note that (G2) and (G3) imply the following:

(G7)A,B ∈ G⇒ A−1B ∈ G.

Properties (G2), (G3), and (G7), are referred to as the group (algebraic)closure under its operations of composition, inversion, and difference,respectively. Suppose our data can be represented as elements of amatrix Lie group. These closure properties imply that the representationis consistent.

Definition (Abelian matrix Lie group)

If AB = BA for any A and B in a matrix Lie group G, then G is calledAbelian.

June 14, 2017 7 / 46

Page 8: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups Definition and Basic Properties

The class of matrix Lie groups is contained in the more general class of(finite-dimensional) Lie groups: every matrix Lie group is a Lie group whilethe converse is false. Matrix Lie groups are simpler to work with (anddefine) than the more general case of Lie groups. We will restrictdiscussion to matrix Lie groups.

June 14, 2017 8 / 46

Page 9: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups Several Important Matrix Lie Groups

We start with the most general matrix Lie group.

Definition (The general linear group of order n)

The general linear group of order n, denoted by GL(n), is given by

Q |Q ∈ Rn×n , detQ 6= 0

We call it the most general as, by (G3), we see that every matrix Liegroup of n× n matrices is a matrix Lie subgroup1 of GL(n).

1The relation between a matrix Lie subgroup and a matrix Lie group is analogous tothe relation between a subgroup and a group.

June 14, 2017 9 / 46

Page 10: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups Several Important Matrix Lie Groups

GL(n) is not a connected space.

To see that, pick a matrix A in GL(n) with a positive determinant anda matrix B in GL(n) with a negative determinant. Then, set p = A andq = B. As det : Rn×n → R is continuous continuous curve between pand q must pass through a matrix of zero determinant; i.e., the curvemust make an excursion outside of GL(n). In fact, it can be shown thatGL(n) has exactly two connected components.

Definition (The identity component)

The identity component of a matrix Lie group is one that contains In×n.The identity component of a matrix Lie group is always a matrix Lie groupby itself.

Definition (GL+(n))

The identity component of GL(n), denoted by GL+(n), is given by

Q |Q ∈ Rn×n ,detQ > 0

June 14, 2017 10 / 46

Page 11: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups Several Important Matrix Lie Groups

Not every set of n× n invertible matrices is a matrix group. E.g.,consider SPD matrices. Even if A and B are SPD, C = AB is usuallynot SPD. The problem is not with the positive definiteness, but with thesymmetry.

June 14, 2017 11 / 46

Page 12: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups Several Important Matrix Lie Groups

Definition (US(n))

The uniform scale group, denoted by US(n), is given by

Q |Q = SIn×n, S ∈ R≥0.

June 14, 2017 12 / 46

Page 13: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups Several Important Matrix Lie Groups

Definition (The orthogonal group)

The orthogonal group of degree n is given by

O(n) , R ∈ Rn×n |RTR = RRT = In×n

The distinction between O(n) and the Stiefel manifold of order (n, n), isthat the Stiefel manifold is just the set,

R ∈ Rn×n |RTR = RRT = In×n ,

without the binary operation of matrix multiplication.

June 14, 2017 13 / 46

Page 14: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups Several Important Matrix Lie Groups

Definition (The special orthogonal group)

The special orthogonal group of degree n, also known as the rotationgroup and denoted by SO(n), is given by

SO(n) , R ∈ Rn×n |RTR = RRT = In×n & detR = +1

SO(n) is a subgroup of O(n)

June 14, 2017 14 / 46

Page 15: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups Several Important Matrix Lie Groups

In particular, we single out the case of n = 3.

Definition (SO(3))

The special orthogonal group of degree 3, also known as the rotationgroup (of order 3), is denoted by SO(3).

June 14, 2017 15 / 46

Page 16: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups Direct Products of Matrix Lie Groups

Direct Products

Let Gi be a matrix subgroup of GL(ni), i = 1, 2, . . . , k. The standardgroup direct product of Giki=1, denoted by G1 ×G2 × . . .×Gk, is nottechnically a matrix Lie group, as its elements are k-tuples of matrices(such as (g1, g2, . . . , gk)) rather than matrices.

It is, however, easy to identify such a direct product with a matrix Liesubgroup of GL(n1 + n2 + . . .+ nk) using the correspondence betweena k−tuple (g1, g2, . . . , gk) and a block-diagonal matrix:

(g1, g2, . . . , gk)↔

g1 0

g2. . .

0 gk

∈ GL(n1 + n2 + . . .+ nk) .

If the Gi’s are k copies of the same matrix Lie group G, then we denotetheir direct product by Gk.

June 14, 2017 16 / 46

Page 17: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups Matrix Lie Groups as Smooth Manifolds

A matrix Lie group is a nonlinear space.

Proof.

If A is any invertible matrix (in fact, in GL(n)), then A−A = 0n×n isnot invertible. Thus, while a matrix Lie group is closed under theoperations mentioned earlier, it is not closed under linear combinations.

In particular, it does not make sense to talk about linear subspaces ofsuch a group. It may make sense to talk about subsets, and thesesubsets may or may not be subgroups of the group.

It may seem odd that an object called the general linear group is notlinear, but the linearity in the name refers to the fact that every elementA of the group is affiliated with a linear map Rn → Rn, x 7→ Ax.

June 14, 2017 17 / 46

Page 18: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups Matrix Lie Groups as Smooth Manifolds

While nonlinear, every matrix Lie group is a finite-dimensional smoothmanifold.

Thus, a matrix Lie group is a group on which one can “do calculus”.Alternatively, a matrix Lie group is a smooth manifold with a groupstructure.

Groups are usually denoted by G, while manifolds are usually denoted byM . Since a matrix Lie group is both a group and a manifold, bothnotations may be used.

June 14, 2017 18 / 46

Page 19: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups Matrix Lie Groups as Smooth Manifolds

Dimensionality

Every matrix group of n× n matrices is a nonlinear subset of Rn×n, thelatter being an n2-dimensional space. Since such a group is also afinite-dimensional manifold, it has its own dimension. Let D denote thedimension of the group; note D ≤ n2.

The dimension of both GL(n) and GL+(n), e.g., is D = n2. Note thisis the same dimension as that of Rn×n, in spite of the fact that GL+(n)is a proper subset of GL(n), which in turn is a proper subset of Rn×n.

The point here is that once we deal with nonlinear manifolds, even iftwo spaces have the same dimension, one can still be strictly larger thanthe other.

June 14, 2017 19 / 46

Page 20: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups Matrix Lie Groups as Smooth Manifolds

Dimensionality

The dimension of SO(2) is 1.

The dimension of SO(3) is 3.

More generally, the dimensionality of SO(n) is

n2 − n2

June 14, 2017 20 / 46

Page 21: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups Matrix Lie Groups as Smooth Manifolds

Smoothness and Tangent Spaces

An important implication of the fact that a matrix Lie group G is asmooth manifold is that it is possible to define smooth curves on G.

Note that if c : J → G is a smooth curve from some open interval J inR into G, then c(t) is itself a matrix that belongs to G. If wedifferentiate c w.r.t. t (i.e., differentiate each entry of the matrix c(t)w.r.t. t), then we will get a new curve, c. However, this curve is a mapc : J → Rn×n, not c : J → G.

Regarding Rn×n as Rn2(which is hard to visualize: even for 2-by-2

matrices this is already a 4D space), we can imagine c(t) as ann2-dimensional vector attached to the curve at the n2-dimensional pointc(t).

June 14, 2017 21 / 46

Page 22: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups Matrix Lie Groups as Smooth Manifolds

In terms of standard differential geometry of curves and surfaces inEuclidean spaces, c(t) is a tangent vector to the curve. In fact, it is alsoa tangent vector to the manifold at the point p.

For a given point p, and a given open interval J that contains 0,consider all smooth curves c : J → G that pass though p and satisfyc(0) = p. Let us denote this class of curves by CJ,p. The tangentvectors, at p, are given by the set of distinct1 elements

c(0) : c ∈ CJ,p .

1Many different curves in CJ,p can have the same derivative at t equals zero. Thus,their derivatives form equivalent classes. The set-theoretic notation means we pick onerepresentative from each class.

June 14, 2017 22 / 46

Page 23: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups Matrix Lie Groups as Smooth Manifolds

It can be shown that the particular choice of J is immaterial.

It turns out that the tangent vectors form a subspace of Rn×n. Thissubspace is denoted by TpG (had we used M instead of G we wouldhave written TpM) and its dimension is identical to that of the matrixLie group G:

dimG = dimTpG .

June 14, 2017 23 / 46

Page 24: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups Matrix Lie Groups as Smooth Manifolds

E.g., for G = GL(n), the dimension of the tangent space is n2 (so TpGis a perfect copy of Rn×n, both being Euclidean spaces of the samedimension) while for G = SO(3) the dimension of the tangent space is3. Let G be a D-dimensional matrix Lie group of n× n matrices.

Since at every point p in G we can attach a tangent space which is acopy of RD, all these tangent spaces are the same in some sense.

Having said that, the tangent space at the identify (i.e., p = I) is ratherspecial as we shall see.

June 14, 2017 24 / 46

Page 25: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups Matrix Lie Groups as Smooth Manifolds

In spite of the fact that an element of TpG is always an n× n matrix, itis often useful to regard it a vector in Rn×n. For this we use thefollowing notation:

VEC(·) : TpG→ Rn2MAT(·) : Rn2 → TpG (1)

where VEC stands for concatenating the matrix columns (or rows) in asingle long column, while MAT is the inverse of VEC.

June 14, 2017 25 / 46

Page 26: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups Matrix Lie Groups as Smooth Manifolds

Characterization of Elements of a Tangent Space

Let c ∈ CJ,p. Define another smooth curve by cI : J → G,cI : t 7→ p−1c(t). We think of this operation as left-translation (of acurve) by p−1. It follows that cI(0) = I (as c(0) = p) and thatcI ∈ CJ,I .

Likewise, for every c in CJ,I there is an element in CJ,p, denoted by cp,such that cp : J → G, cp : t 7→ pc(t). Naturally, we think of this asleft-translation (of a curve) by p. These relations establish an obviousbijection between CJ,I and CJ,p.

Let c ∈ CJ,I . Since

d

dt(pc(t))

∣∣∣∣t=0

= pd

dtc(t)

∣∣∣∣t=0

,

it follows that the tangent vectors that comprise TpG are given by

TpG = px : x ∈ TIG

Note: p ∈ G, x ∈ TIG, and their matrix product, px, is in TpG.

June 14, 2017 26 / 46

Page 27: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups Matrix Lie Groups as Smooth Manifolds

Consequently, if we know how to characterize TIG, then we know howto characterize TpG.

Similarly,TIG = p−1x : x ∈ TpG

We think of the map

TIG→ TpG x 7→ px

as left-translation (of a tangent vector) by p. Right-translation by p isdefined similarly by

TIG→ TpG x 7→ xp

June 14, 2017 27 / 46

Page 28: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups Matrix Lie Groups as Smooth Manifolds

More generally, if p and g are in G then one way to map, bijectively, thetangent vectors in TpG into TqG is by left-multiplication of a tangentvector (which is in fact a matrix) from TpG by qp−1 to produce anothertangent vector (again, a matrix) in the TqG

Again, this is called left-translation, with right-translation defined in asimilar way.

June 14, 2017 28 / 46

Page 29: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups Matrix Lie Groups as Smooth Manifolds

Tangent Spaces to the Orthogonal Group

Let R : (α, β)→ O(n) be a differentiable curve.

Suppose that R|t=0 is the n× n identity matrix.

Then:

RTR = In×n

d

dt(RTR) =

d

dtIn×n

d

dt(RT )R+RT d

dt(R) = 0n×n

Setting t = 0 and letting ω = ddtR

∣∣t=0

, we obtain:

ωT + ω = 0n×n

Thus, ω is skew-symmetric; namely, ω = −ωT .

June 14, 2017 29 / 46

Page 30: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups Matrix Lie Groups as Smooth Manifolds

Tangent Spaces to the Orthogonal Group

Let R : (α, β)→ SO(n) be a differentiable curve.

If R|t=0 is the n× n identity matrix and ω = ddtR

∣∣t=0

then ω isskew-symmetric.

In other words, SO(n) and O(n) have the same tangent space at theidentity, and thus, at every p, the two groups share the same tangentspace (see next slide)

June 14, 2017 30 / 46

Page 31: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups Matrix Lie Groups as Smooth Manifolds

Tangent Spaces to the Orthogonal Group

If p is a point in SO(n) (or SO(n) such that p 6= I, we characterize theelements of TpSO(n) by

TpSO(n) = pA : A ∈ TISO(n) ,

i.e., TpSO(n) (or TpO(n)) is exactly the set of all n× n matrices thatcan be written as the matrix product of the matrix group element p, andsome n× n skew-symmetric matrix.

June 14, 2017 31 / 46

Page 32: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups The Matrix Exponential and Matrix Logarithm

Definition (The matrix exponential)

exp : Rn×n → Rn×n, exp : A 7→∞∑k=0

Ak

k!

where Ak =

k times︷ ︸︸ ︷AA . . . A is a sequence of matrix products.

For a real-valued square matrix A, we can define the matrix logarithm,denoted log(A) as a square matrix satisfying exp(B) = A.

June 14, 2017 32 / 46

Page 33: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups The Matrix Exponential and Matrix Logarithm

The matrix exponential is generalization of the simple exponentialfunction from the scalar case. There are however, some notabledifferences. E.g., let A and B be some two n× n matrices. In general,exp(A) exp(B) 6= exp(A+B), with equality if and only ifAB −BA = 0. Likewise, log(A−1B) 6= − log(A) + log(B); however, asa first-order approximation, we have the following important result:

log(A−1B) ≈ log(B)− log(A) .

June 14, 2017 33 / 46

Page 34: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups The Matrix Exponential and Matrix Logarithm

If A is block-diagonal, then exp(A) is also block diagonal and eachblock can be exponentiated independently.

In the extreme case that the matrix is diagonal, then we can simply usescalar exponentiation for each diagonal entry.

As a particular case, exp(0n×n) = In×n and log(In×n) = 0n×n.

If A is nilpotent (so Ak = 0n×n for some finite k), then the series has afinite number of terms.

If A is diagonalizable, there is a simple way to exponentiate it usingdiagonalization and scalar exponentiation.

Sometimes, if A has a specific structure (such as, but not limited to, thestructures mentioned above) it is possible to compute exp(A) withouthaving to deal with the infinite sum.

If no structure on A can be utilized, then exp(A) can be efficientlyapproximated.

June 14, 2017 34 / 46

Page 35: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups The Matrix Exponential and Matrix Logarithm

Matrix Exponential

Usually, the matrix exponential has no closed form so one resort to(good) numerical approximations.

But if a matrix has some special structure, then sometimes we can derivea closed-form matrix exponential. This is the case, e.g., for SO(3). Inwhich case, the closed-form solution is known as Rodrigues’ formula.

In OpenCV: cv2.Rodrigues

June 14, 2017 35 / 46

Page 36: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups The Matrix Exponential and Matrix Logarithm

Ω =

0 −ωz ωy

ωz 0 −ωx

−ωy ωx 0

∈ so(3)

ω =

ωx

ωy

ωz

θ = ‖ω‖ r =

rxryrz

=1

θω

SO(3) 3 R = exp(Ω)

Rodrigues’ formula= cos θI3×3 + (1− cosθ)rrT + sin θ

0 −rz ryrz 0 −rx−ry rx 0

For “inversion” (computing ω from R), use:

sin θ

0 −rz ryrz 0 −rx−ry rx 0

=R+RT

2

June 14, 2017 36 / 46

Page 37: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups The Lie Algebras of Matrix Lie Groups

While Lie algebras are mathematical objects that are worth studying fortheir own merit, and while they can also be defined without anyreference to Lie groups, our interest in them is due to the fact theyprovide an indispensable tool when working with Lie groups.

In fact, one of the main reasons for the attractiveness of Lie groups (andnot just matrix Lie groups) is their Lie algebras. We avoid giving themost general definition of Lie algebras and confine ourselves to Liealgebras of real-valued matrix Lie groups.

June 14, 2017 37 / 46

Page 38: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups The Lie Algebras of Matrix Lie Groups

Definition (Lie algebra)

Let G be a real-valued matrix Lie group. Its Lie algebra g is given by thevector space

g = exp−1(G),

and [·, ·] : g×g→ g, the Lie bracket of g , is given by (A,B) 7→ AB−BA.

g is closed under the Lie bracket.

June 14, 2017 38 / 46

Page 39: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups The Lie Algebras of Matrix Lie Groups

Remark

Note that the notation exp−1(G) does not imply that the mapexp : g→ G is invertible; rather, it is merely the standard set-theoreticnotation for preimage of the set G under the map exp : g→ G, whichmeans all those elements (of Rn×n) such that when we exponentiatethem, we end up in G. In other words,

exp−1(G) , A : exp(A) ∈ G .

In particular, depending on G, the map exp : g→ G might not besurjective.

June 14, 2017 39 / 46

Page 40: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups The Lie Algebras of Matrix Lie Groups

Example (exp is not always a surjection)

Since it can be shown that

det(exp(A)) = etr(A)

(note the RHS is always positive), it follows that exp(A) always has apositive determinant. Consequently, if B has a negative determinant(hence B ∈ GL(n)), then there does not exist an A ∈ Rn×n such thatexp(A) = B.

Moreover, depending on G, the map exp : g→ G might not be injective.

June 14, 2017 40 / 46

Page 41: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups The Lie Algebras of Matrix Lie Groups

As in the case of matrix Lie groups, we will usually avoid mentioning theLie bracket, and simply refer to the vector space as the Lie algebra g. Itturns out that the elements of g coincide with those of TIG, the tangentspace at the identity. Thus, we will use g and TIG interchangeably.

June 14, 2017 41 / 46

Page 42: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups The Lie Algebras of Matrix Lie Groups

Definition (The gl(n) Lie algebra)

The Lie algebra of both GL(n) and GL+(n) is given by

gl(n) , exp−1(GL(n)) = exp−1(GL+(n)) = Rn×n .

Definition (The us(n) Lie algebra)

us(n) , exp−1(US(n)) = Q : Q = sIn×n, s ∈ R .

June 14, 2017 42 / 46

Page 43: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups The Lie Algebras of Matrix Lie Groups

Definition (The so(n) Lie algebra)

so(n) , exp−1(O(n)) = exp−1(SO(n) = Q : Q = −QT ⊂ gl(n) .

And again, will single out the 3D case:

Definition (The so(3) Lie algebra)

so(3) , exp−1(SO(3)) = Q : Q = −QT ⊂ gl(3) .

June 14, 2017 43 / 46

Page 44: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups The Lie Algebras of Matrix Lie Groups

More generally, the matrix exponential maps linear subspaces of the Liealgebra to matrix Lie subgroups. This turns out to be very convenient fordoing, e.g., statistics.Finally, the Lie algebra of a direct product of matrix Lie groups can betreated in terms that are direct analogs of the way we handle a directproduct of matrix Lie groups.

June 14, 2017 44 / 46

Page 45: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups The Lie Algebras of Matrix Lie Groups

The Special Orthogonal Group

Recall this manifold is three dimensional. View it as a smooth nonlinearsubset of R9.

Think of ω = ddtR∣∣t=0

as a tangent vector.

Since ω has 3 degrees of freedom, it is also 3D in nature.

Point: the tangent space (in this case, at the identity) has the samedimensionality as the manifold. In fact, this is a general result forsmooth manifolds.

The tangent space at the identity of a (matrix) Lie group is called a(matrix) Lie algebra. The Lie algebra of SO(3) is denoted so(3).

Turns out, the matrix exponential maps so(3) to SO(3); i.e., if ω is a3× 3 skew-symmetric matrix, then R = exp(ω) is a rotation matrix.Again, this too is a general result for matrix Lie groups and matrix Liealgebras.

June 14, 2017 45 / 46

Page 46: Methods in Computer Vision: Introduction to Matrix Lie Groupsmcv172/wiki.files/LecLie.pdf · Methods in Computer Vision: Introduction to Matrix Lie Groups Oren Freifeld Computer Science,

Matrix Lie groups The Lie Algebras of Matrix Lie Groups

Utilizing the Tangent Space for Handling the Nonlinearity

For optimization (e.g., during extrinsic calibration)

For tracking

For statistics

June 14, 2017 46 / 46