Linear Algebra · Theory · M8
M8-T1 — Introduction to Robot Kinematics
A robot arm is a function from joint angles to hand position. Everything in this module is about that function and its derivative.
Motors move joints, but tasks are described at the hand: put the gripper here, trace this line. Kinematics is the mathematics that connects the two. This lesson sets the vocabulary: joints, links, configurations, task space, forward and inverse kinematics, and degrees of freedom. The rest of Module 8 builds on it with calculus and the linear algebra of the earlier modules.
Learning objectives
After this lesson, you should be able to:
- Define joint, link, configuration, joint space, task space, workspace and degrees of freedom.
- Distinguish forward kinematics (a function) from inverse kinematics (a search that may have many or no answers).
- Count degrees of freedom and decide if a manipulator is under-actuated, fully actuated or redundant for a task.
- Explain why velocity-level (differential) kinematics is linear and therefore the right tool for control.
Introduction and motivation
A warehouse arm must place a box at a given pose; a drone with a gripper must reach a perch; a mobile robot must position its camera on a gimbal. In all cases a controller is given a target in task space and has to produce joint commands. Position-level kinematics is a nonlinear, sometimes multi-valued function, hard to invert in closed form for most arms. The key move of this module is to differentiate it: the resulting map between velocities is a plain matrix, and everything learned in Modules 2 to 6 applies.
The intuition
Think of the joint angles as the dials on a control panel. Set all the dials and the arm takes exactly one shape, and the hand sits at exactly one place: that is forward kinematics, a function. Asking the opposite question, which dial settings put the hand at a given place, may have no answer (out of reach), one answer, a finite number (elbow up or down) or infinitely many (a redundant arm). That is inverse kinematics.
Interactive figure. A two-link planar arm with joint sliders and a draggable hand. The readout shows the hand position and the Jacobian; dashed rings show the outer and inner limits of the reachable workspace. This figure needs JavaScript to be interactive.
Geometric and physical interpretation
Geometric view. A joint connects two links and allows one degree of freedom of relative motion: a revolute joint rotates about an axis, a prismatic joint slides along one. A configuration is a full set of joint values; the configuration space is the set of all of them (a torus for a two-link arm with unlimited revolute joints). The workspace is the set of hand positions the arm can reach: an annulus |l₁ − l₂| ≤ r ≤ l₁ + l₂ for a two-link planar arm. Physical view. The hand pose of a rigid body in 3D lives in SE(3) (Module 7), with six degrees of freedom, so a general arm needs at least six joints to reach every pose in its workspace.
The mathematics
- q ∈ ℝⁿ
- the vector of joint variables (angles for revolute joints, lengths for prismatic ones).
- x ∈ ℝᵐ
- the task-space coordinates of the hand (m = 2 for a planar position, 3 for a 3D position, 6 for a full pose).
- f
- the forward kinematics function, x = f(q).
- n, m
- degrees of freedom of the arm and dimension of the task; n − m is the redundancy.
Forward and inverse kinematics
x = f(q) q = f⁻¹(x) (if it exists)
What it means. Forward kinematics is a product of the link transformations of Module 7 and always has exactly one answer. Inverse kinematics asks for the q that gives a desired x; f is nonlinear, so the answer may not exist, may not be unique, and usually needs numerical solution.
Counting solutions
n < m: usually no exact solution n = m: finitely many n > m: infinitely many (redundant)
What it means. A rule of thumb from counting unknowns against equations. With n joints and an m-dimensional task there are n unknowns and m equations. Exceptions arise at singular or workspace-boundary configurations.
Differentiating gives a linear map
ẋ = J(q) q̇, J(q) = ∂f/∂q (an m × n matrix)
What it means. Take the time derivative of x = f(q): hand velocity is the Jacobian (the matrix of partial derivatives, developed in the following lessons) times joint velocity. For a fixed q this is linear, so all of linear algebra applies.
Forward kinematics is a function from joint space to task space. Inverse kinematics inverts it and may have 0, 1, several or infinitely many answers. Differentiating forward kinematics gives the linear map ẋ = J q̇.
Step-by-step derivation: why differentiating helps, and counting degrees of freedom
- Forward kinematics is a composition. Each joint contributes a rotation (or translation) and each link a fixed offset. In the homogeneous language of Module 7,
T₀ₙ(q) = T₀₁(q₁) T₁₂(q₂) ⋯ Tₙ₋₁,ₙ(qₙ), and the hand pose is read fromT₀ₙ. It is a smooth function made of sines, cosines and products. - Inverse kinematics is hard. Inverting a nonlinear function of several variables has no general formula. A two-link arm has a closed form (next lesson), but a general six-joint arm already requires trigonometric polynomial solving, and a redundant arm has a continuum of solutions.
- Differentiate. For a small change
δqthe hand moves byδx ≈ J(q) δq(a first-order Taylor expansion, made precise by partial derivatives in lesson 3). This relation is linear inδqfor a fixed configuration. - Solve the linear problem repeatedly. To move the hand by a desired
δx, chooseδqto solveJ δq = δx(Module 3 and Module 6), update q, recompute J and repeat. This is the Newton-type loop that most inverse kinematics solvers run. - Degrees of freedom. The mechanism count for a serial arm is the number of independent joints, n. The task has m degrees of freedom: 2 or 3 for a point in the plane or space, 3 for a planar pose (x, y, θ), 6 for a spatial pose. For a point task in the plane an arm with n = 2 has finitely many solutions (elbow up and down), one with n = 3 has a one-parameter family.
- Boundaries. Where the reach limit is touched the two elbow solutions merge into one; beyond it there are none. At such configurations J loses rank: the topic of the singularity lesson.
Velocity kinematics is also a statement about spaces. J maps the n-dimensional space of joint velocities into the m-dimensional space of hand velocities. By rank-nullity (Module 3), the dimension of the hand velocities that can be produced is the rank of J, and the joint velocities that produce no hand motion form the null space, dimension n − rank J. A redundant arm always has a non-trivial null space, which null-space control (lesson 9) exploits.
Mobile robots too. A differential-drive robot has joint-like inputs (wheel speeds) and task coordinates (x, y, θ); its kinematics ẋ = v cos θ, ẏ = v sin θ, θ̇ = ω is the same velocity-level map, though non-integrable (non-holonomic): not every velocity-level motion can be undone by a position-level formula.
A worked example: counting degrees of freedom and one forward map
- Two-link planar arm, point task. Joints n = 2 (shoulder, elbow), task m = 2 (hand x, y): n = m, so a finite number of inverse solutions (two: elbow up and elbow down) within the reachable annulus.
- Same arm, pose task. If we also want the hand orientation (m = 3: x, y, θ), then n = 2 < m = 3: in general no solution.
- Three-link planar arm, point task. n = 3, m = 2: one extra degree of freedom, a one-dimensional family of solutions (redundant). Lesson 10 explores it.
- Six-joint arm, full pose. n = 6 = m: finitely many (up to 8 or 16) solutions in general. A seven-joint arm (such as common collaborative robots) is redundant by one.
- One forward map. For a two-link arm with
l₁ = 1.1,l₂ = 0.8and anglesq = (0°, 90°)the hand is at(l₁ + l₂ cos 90°, l₂ sin 90°) = (1.1, 0.8). The reach limits are|l₁ − l₂| = 0.3andl₁ + l₂ = 1.9; this hand is at distance√(1.21 + 0.64) = 1.36from the base, inside the annulus ✓.
Robotics application
Manipulators. Every task-space controller, from picking to welding, is built on forward kinematics and its derivative; the arm lab and the following lessons cover them from linear algebra.
Mobile robots. Mobile bases have velocity-level kinematics that map wheel speeds to body velocity; navigation controllers such as pure pursuit work in task space and convert to wheel speeds; see robot motion models for navigation and pure pursuit.
UAVs. A multicopter with a gimbal or arm adds joint variables to its body pose; the camera pose is a product of the body pose and gimbal transforms; see UAV coordinate frames.
SLAM and calibration. A sensor on an arm has pose T_WB T_B,tool(q) T_tool,sensor; hand-eye calibration estimates the last factor by least squares (Module 5); see TF frames and consistency.
IMU and GPS. Encoders measure joint angles q, an IMU on the hand measures hand velocity; the Jacobian is how the two are compared in estimation.
Engineering implications and limitations
Practical rules
- Write down the convention. Zero angle, positive direction, link lengths and frame placement (Denavit-Hartenberg or product of exponentials). A sign convention mismatch with the firmware is the most common bring-up bug.
- Check forward kinematics first. Move a joint by hand, compare the computed hand position with a ruler. Only then trust inverse kinematics built on it.
- Respect joint limits and the workspace. Reject unreachable targets early (reach tests) rather than let the solver fail.
- Choose a solution consciously. For multiple solutions (elbow up/down) select by continuity with the current pose, joint limits or collision, not at random.
- Work in velocities for control. Position-level inverse kinematics is run once per target; velocity-level control runs at each tick and is linear.
- Mind units. Radians versus degrees and metres versus millimetres; a Jacobian mixes metres per radian and is not unitless.
Limits
Kinematics describes motion without forces. It ignores link mass, motor limits, flexibility and backlash, which dynamics and calibration handle. Real arms also have joint ranges that cut the configuration space far below a full torus.
Common misconceptions
“Inverse kinematics has one answer.”
It may have none, one, several (elbow up and down) or infinitely many (redundant arms).
“Forward kinematics can be inverted by transposing a matrix.”
It is a nonlinear function, not a matrix. Only its derivative, the Jacobian, is a matrix, and only valid locally.
“More joints always make control simpler.”
Extra joints add flexibility and a null space, but also the need to choose among infinitely many solutions.
“The workspace is a circle of radius l₁ + l₂.”
For a two-link arm it is an annulus; when l₁ ≠ l₂ there is an inner hole of radius |l₁ − l₂|.
Engineering takeaways
- Joint space holds the joint values; task space holds the hand pose; the workspace is the set of reachable hand poses.
- Forward kinematics x = f(q) is a function with one answer; inverse kinematics may have 0, 1, several or infinitely many.
- Degrees of freedom n against task dimension m decide the solution count; n − m is the redundancy.
- Differentiating gives ẋ = J(q) q̇, linear for fixed q, so linear algebra applies.
- Always validate forward kinematics, conventions and units before solving inverse kinematics.
References and further reading
Primary papers and authoritative documentation.
- Modern Robotics (Lynch and Park), free preprint: chapter 4 forward kinematics and chapter 6 inverse kinematics, chapter 5 velocity kinematics
- Michigan ROB 101: Computational Linear Algebra: kinematics modules and interactive material
- Barfoot, State Estimation for Robotics (author-hosted first edition, free to read): chapter 6, kinematics of rigid bodies
- UCSD ECE276A: Sensing and Estimation in Robotics: manipulator kinematics and inverse kinematics
Knowledge check
Three conceptual questions. Write an answer, then reveal the explanation. Your answers stay in your browser.
Question 1
A planar arm has three revolute joints and the task is to place the hand at a given (x, y, θ). How many degrees of freedom and how many solutions would you expect?
Explanation
n = 3 and m = 3 (planar position and orientation): finitely many solutions in general (for example elbow up and elbow down), if the target is reachable.
Question 2
A two-link arm has l₁ = 1.1 and l₂ = 0.8. Is the point (2.0, 0.5) reachable? What about (0.2, 0.0)?
Explanation
(2.0, 0.5): distance √(4 + 0.25) = 2.06 > l₁ + l₂ = 1.9: not reachable. (0.2, 0): distance 0.2 < |l₁ − l₂| = 0.3: inside the inner hole, not reachable.
Question 3
Why do control engineers use ẋ = J q̇ rather than inverting x = f(q) at every control tick?
Explanation
f is nonlinear and may have no closed-form or many inverses, while ẋ = J q̇ is a linear equation for the joint velocities at the current configuration. It is cheap to solve (Module 3 and 6) and gives a continuous, predictable motion.
What’s next
We now compute forward kinematics for the simplest non-trivial arm, two links in a plane, derive the reachable workspace and solve its inverse kinematics in closed form.
Related content
Nothing below is required to finish this lesson.
- BeforeM7-T9: Transforming Points Between Frames
Move points and measurements from a sensor frame to the world frame and back, step by step.
Get notified when the next lesson and new labs are released.
One email per new lesson or lab.