Mathematical Foundations for Robotics
Mathematical Foundations for Robotics
The study of robotics is, at its core, an exercise in applied mathematics. From the moment a robot's sensors capture raw environmental data to the instant its actuators execute motor commands, every computation, every decision, and every movement can be understood through the lens of mathematical formalism. This chapter establishes the essential mathematical toolkit that underlies all subsequent discussions in this book. Rather than treating these topics as isolated subjects, we present them with careful attention to their geometric interpretations and practical relevance to robotics applications. The conventions and notations introduced here will be used consistently throughout the remainder of this text, creating a coherent mathematical language that facilitates precise communication of increasingly complex concepts.
Vector Spaces and Linear Transformations
The Structure of Vector Spaces
A vector space (also called a linear space) over a field $\mathbb{F}$ is a set $V$ equipped with two operations: vector addition and scalar multiplication. For robotics applications, we primarily work with the field of real numbers $\mathbb{R}$, giving us real vector spaces. The axioms defining a vector space ensure that vectors can be added together and scaled by real numbers while preserving the expected algebraic structure.
Definition (Vector Space). A set $V$ is a real vector space if for all $\mathbf{u}, \mathbf{v}, \mathbf{w} \in V$ and scalars $\alpha, \beta \in \mathbb{R}$:
1. Closure under addition: $\mathbf{u} + \mathbf{v} \in V$ 2. Commutativity: $\mathbf{u} + \mathbf{v} = \mathbf{v} + \mathbf{u}$ 3. Associativity: $(\mathbf{u} + \mathbf{v}) + \mathbf{w} = \mathbf{u} + (\mathbf{v} + \mathbf{w})$ 4. Additive identity: There exists $\mathbf{0} \in V$ such that $\mathbf{u} + \mathbf{0} = \mathbf{u}$ 5. Additive inverse: For each $\mathbf{u}$, there exists $-\mathbf{u}$ such that $\mathbf{u} + (-\mathbf{u}) = \mathbf{0}$ 6. Closure under scalar multiplication: $\alpha \mathbf{u} \in V$ 7. Distributivity: $\alpha(\mathbf{u} + \mathbf{v}) = \alpha\mathbf{u} + \alpha\mathbf{v}$ and $(\alpha + \beta)\mathbf{u} = \alpha\mathbf{u} + \beta\mathbf{u}$ 8. Associativity of scalars: $\alpha(\beta\mathbf{u}) = (\alpha\beta)\mathbf{u}$ 9. Multiplicative identity: $1\mathbf{u} = \mathbf{u}$
The most common vector spaces in robotics are $\mathbb{R}^n$, the space of $n$-dimensional real column vectors. A position in three-dimensional space is represented as $\mathbf{p} = [p_x, p_y, p_z]^T \in \mathbb{R}^3$, while a configuration of a robot with $n$ degrees of freedom might be expressed as $\mathbf{q} = [q_1, q_2, \ldots, q_n]^T \in \mathbb{R}^n$. The choice of representation matters significantly in robotics, as different coordinate systems and conventions can simplify or complicate subsequent computations.
Linear Transformations and Matrices
A linear transformation $T: V \to W$ between two vector spaces maps vectors in $V$ to vectors in $W$ while preserving the linear structure:
$$T(\alpha \mathbf{u} + \beta \mathbf{v}) = \alpha T(\mathbf{u}) + \beta T(\mathbf{v})$$
for all $\mathbf{u}, \mathbf{v} \in V$ and scalars $\alpha, \beta \in \mathbb{R}$. When we fix bases for $V$ and $W$, every linear transformation corresponds uniquely to a matrix. If $V = \mathbb{R}^n$ and $W = \mathbb{R}^m$, then $T$ is represented by an $m \times n$ matrix $A$ such that $T(\mathbf{x}) = A\mathbf{x}$.
Example (Rotation in the Plane). Consider the linear transformation that rotates vectors in $\mathbb{R}^2$ by an angle $\theta$ counterclockwise about the origin. This transformation is represented by the matrix:
$$R(\theta) = \begin{bmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{bmatrix}$$
Applying this transformation to the standard basis vectors reveals its action: $R(\theta)\mathbf{e}_1 = [\cos\theta, \sin\theta]^T$ and $R(\theta)\mathbf{e}_2 = [-\sin\theta, \cos\theta]^T$. The preservation of vector length under rotation can be verified through the property $R(\theta)^T R(\theta) = I$, where $I$ is the identity matrix.
Inner Products and Norms
Beyond the basic vector space structure, robotics extensively employs inner products, which introduce geometric concepts such as length, angle, and orthogonality. An inner product on a real vector space $V$ is a binary operation $\langle \cdot, \cdot \rangle: V \times V \to \mathbb{R}$ satisfying:
1. Positive definiteness: $\langle \mathbf{v}, \mathbf{v} \rangle \geq 0$ with equality only when $\mathbf{v} = \mathbf{0}$ 2. Linearity in the first argument: $\langle \alpha\mathbf{u} + \beta\mathbf{v}, \mathbf{w} \rangle = \alpha\langle \mathbf{u}, \mathbf{w} \rangle + \beta\langle \mathbf{v}, \mathbf{w} \rangle$ 3. Symmetry: $\langle \mathbf{u}, \mathbf{v} \rangle = \langle \mathbf{v}, \mathbf{u} \rangle$
The standard inner product on $\mathbb{R}^n$ is $\langle \mathbf{u}, \mathbf{v} \rangle = \mathbf{u}^T \mathbf{v} = \sum_{i=1}^n u_i v_i$. From this, we derive the Euclidean norm $\|\mathbf{v}\| = \sqrt{\langle \mathbf{v}, \mathbf{v} \rangle} = \sqrt{\mathbf{v}^T\mathbf{v}}$, which gives the familiar straight-line distance from the origin to the point $\mathbf{v}$.
Example (Distance and Angle in Robotics). Given two positions $\mathbf{p}_1, \mathbf{p}_2 \in \mathbb{R}^3$ measured by a robot's sensors, the Euclidean distance between them is $\|\mathbf{p}_1 - \mathbf{p}_2\|$. The angle between two direction vectors $\mathbf{a}, \mathbf{b} \in \mathbb{R}^3$ can be computed using the inner product:
$$\cos\theta = \frac{\langle \mathbf{a}, \mathbf{b} \rangle}{\|\mathbf{a}\|\|\mathbf{b}\|}$$
This relationship is fundamental to tasks such as visual servoing, where a robot must align its orientation with a target direction, or collision avoidance, where proximity to obstacles is quantified.
The Cauchy-Schwarz inequality $|\langle \mathbf{u}, \mathbf{v} \rangle| \leq \|\mathbf{u}\|\|\mathbf{v}\|$ guarantees that the ratio in the angle formula always lies within $[-1, 1]$, ensuring the arccosine is well-defined.
Subspaces, Span, and Linear Independence
A subspace of a vector space $V$ is a subset $U \subseteq V$ that is itself a vector space under the same operations. Subspaces arise naturally in robotics: the column space of a matrix describes all reachable positions given certain control inputs, while the null space represents configurations that produce no observable effect on the system output.
The span of a set of vectors $\{\mathbf{v}_1, \mathbf{v}_2, \ldots, \mathbf{v}_k\}$ is the set of all linear combinations:
$$\text{span}\{\mathbf{v}_1, \ldots, \mathbf{v}_k\} = \left\{ \sum_{i=1}^k \alpha_i \mathbf{v}_i \mid \alpha_i \in \mathbb{R} \right\}$$
A set of vectors is linearly independent if no vector in the set can be expressed as a linear combination of the others. The maximum number of linearly independent vectors in $V$ determines the dimension of the space. A set of $n$ linearly independent vectors in $\mathbb{R}^n$ forms a basis, and every vector can be uniquely represented as a linear combination of basis vectors.
Example (Joint Space and Workspace). Consider a planar robot arm with two revolute joints. The joint space configuration $\mathbf{q} = [\theta_1, \theta_2]^T \in \mathbb{R}^2$ lives in a two-dimensional vector space. The forward kinematics map $\mathbf{f}(\mathbf{q})$ produces positions in the workspace, which is a subspace (specifically, a two-dimensional surface embedded in $\mathbb{R}^3$ or $\mathbb{R}^2$ for planar motion). Understanding which subspaces are relevant—and how they relate through linear and nonlinear transformations—is essential for robot control and planning.
Eigenvalues and Eigenvectors
Eigenvalues and eigenvectors provide fundamental insight into the behavior of linear transformations. For a square m