Velocity kinematics and the Jacobian
How joint speeds become hand speed: build the planar two-link Jacobian from the idea of rotating points, check it numerically, and see why singular configurations make the hand stuck.
Lesson 6 of 6 · 40 min · Self-paced · Free
From where to how fast
So far we have asked where the hand is. Many tasks care just as much about how it moves. A robot drawing a straight line, gluing along a seam, or sliding a tray across a table must keep its hand moving in a chosen direction at a chosen speed. That means converting between joint speeds (how fast each joint turns, in radians per second) and hand velocity (how fast, and which way, the hand moves, in cm/s). The tool that does this is the Jacobian, and it also explains the singularities you met in the last lesson.
A note on notation: engineers write a dot over a quantity to mean "how fast it is changing". So θ̇₁ ("theta-one-dot") is the shoulder's angular speed and ẋ is how fast the hand's x coordinate is changing. You do not need calculus for this lesson; the ideas come from circles.
One link: speed equals angular speed times radius
Spin a single link of length L about its joint at angular speed ω (omega), in rad/s. The tip moves around a circle, always perpendicular to the link. Its speed is:
v = ω × LThis simple formula only works with ω in radians per second. That is the deep reason radians are used: one radian of rotation moves a point exactly one radius along the circle. A 10 cm link turning at 0.5 rad/s moves its tip at 5 cm/s.
There is a tidy way to get the direction too. If the vector from the pivot to the point is (a, b), then the point's velocity is that vector rotated by 90° and scaled by ω:
velocity = ω × (−b, a)Rotating by 90° is the R(90°) rule from the rotations lesson: (a, b) becomes (−b, a).
Two links: add the contributions
Now the two-link arm. Each joint's motion contributes some hand velocity, and the contributions simply add.
- Shoulder turning at θ̇₁ swings the whole arm about the base. The hand moves as a point at the end of the vector from the base to the hand, (x, y). Its contribution is θ̇₁ × (−y, x).
- Elbow turning at θ̇₂ swings only the forearm, about the elbow. The vector from elbow to hand is (L₂ cos(θ₁ + θ₂), L₂ sin(θ₁ + θ₂)). Its contribution is θ̇₂ times that vector rotated by 90°.
Writing s₁ = sin θ₁, c₁ = cos θ₁, s₁₂ = sin(θ₁ + θ₂) and c₁₂ = cos(θ₁ + θ₂), and adding:
ẋ = −(L₁·s₁ + L₂·s₁₂) · θ̇₁ − L₂·s₁₂ · θ̇₂
ẏ = (L₁·c₁ + L₂·c₁₂) · θ̇₁ + L₂·c₁₂ · θ̇₂The four coefficients form a 2 × 2 matrix, the Jacobian J:
J = [ −L₁·s₁ − L₂·s₁₂ −L₂·s₁₂ ]
[ L₁·c₁ + L₂·c₁₂ L₂·c₁₂ ]
[ ẋ ] [ θ̇₁ ]
[ ẏ ] = J · [ θ̇₂ ]Read it by columns, just as you read rotation matrices: column 1 is the hand velocity produced by turning only the shoulder at 1 rad/s; column 2 is the hand velocity produced by turning only the elbow at 1 rad/s. Any combination of joint speeds produces a mix of those two columns.
Unlike a rotation matrix, the Jacobian changes as the arm moves, because it depends on θ₁ and θ₂. It describes how the arm can move right now, in its current pose.
Worked example
Use the familiar arm: L₁ = 10 cm, L₂ = 8 cm, θ₁ = 30°, θ₂ = 45°, with the hand at (10.73, 12.73). Then:
J ≈ [ −12.727 −7.727 ]
[ 10.731 2.071 ]The first column is (−y, x) for the hand, as expected. Now try three sets of joint speeds:
θ̇ = (0.5, 0) → hand velocity (−6.364, 5.365) cm/s, speed 8.32 cm/s
θ̇ = (0, 1) → hand velocity (−7.727, 2.071) cm/s, speed 8.00 cm/s
θ̇ = (0.5, −0.5) → hand velocity (−2.500, 4.330) cm/s, speed 5.00 cm/sEach result can be understood without the matrix:
- Shoulder only at 0.5 rad/s: the hand is 16.65 cm from the base, and 0.5 × 16.65 ≈ 8.32 cm/s.
- Elbow only at 1 rad/s: the hand is 8 cm from the elbow, so it moves at 1 × 8 = 8 cm/s.
- Shoulder +0.5 and elbow −0.5: the forearm's absolute angle θ₁ + θ₂ stays fixed, so the forearm slides along without turning and the hand moves exactly like the elbow: 0.5 × 10 = 5 cm/s.
Check it numerically
A good engineer never trusts a derived formula without an independent test. Here, the test is to take a tiny time step, move the joints a tiny amount, recompute the hand position with forward kinematics, and divide the change by the time:
import math
L1, L2 = 10, 8
def fk(t1, t2):
return (L1 * math.cos(t1) + L2 * math.cos(t1 + t2),
L1 * math.sin(t1) + L2 * math.sin(t1 + t2))
def jacobian(t1, t2):
s1, c1 = math.sin(t1), math.cos(t1)
s12, c12 = math.sin(t1 + t2), math.cos(t1 + t2)
return [[-L1 * s1 - L2 * s12, -L2 * s12],
[ L1 * c1 + L2 * c12, L2 * c12]]
t1, t2 = math.radians(30), math.radians(45)
rate1, rate2 = 0.5, 0.0 # joint speeds in rad/s
J = jacobian(t1, t2)
vx = J[0][0] * rate1 + J[0][1] * rate2
vy = J[1][0] * rate1 + J[1][1] * rate2
print(f"Jacobian: ({vx:.3f}, {vy:.3f}) cm/s")
dt = 0.0001 # a tiny time step, in seconds
x0, y0 = fk(t1, t2)
x1, y1 = fk(t1 + rate1 * dt, t2 + rate2 * dt)
print(f"tiny step: ({(x1 - x0) / dt:.3f}, {(y1 - y0) / dt:.3f}) cm/s")Jacobian: (-6.364, 5.365) cm/s
tiny step: (-6.364, 5.365) cm/sThey agree to three decimal places. This "finite difference" check is how engineers test Jacobians in real robot software too.
Going backwards: joint speeds for a desired hand velocity
The useful direction is usually the reverse: "I want the hand to move at (ẋ, ẏ); how fast should each joint turn?" That means solving two equations for two unknowns. For a 2 × 2 matrix with entries J₁₁, J₁₂ (top row) and J₂₁, J₂₂ (bottom row), the solution is:
det = J₁₁·J₂₂ − J₁₂·J₂₁
θ̇₁ = ( J₂₂·ẋ − J₁₂·ẏ) / det
θ̇₂ = (−J₂₁·ẋ + J₁₁·ẏ) / detThe number det is the determinant. For the two-link arm, the algebra simplifies beautifully:
det = L₁ · L₂ · sin θ₂For our example, det = 10 × 8 × sin 45° ≈ 56.57.
Singular configurations
Look at what happens when sin θ₂ = 0, that is, θ₂ = 0° (arm straight) or 180° (arm folded). The determinant is zero, and the formulas above would divide by zero. That is the mathematical face of a singularity.
The physical picture is clearer. With the arm straight, both columns of J point in the same direction, perpendicular to the arm. Turning the shoulder moves the hand sideways; turning the elbow also moves the hand sideways. Neither joint can move the hand along the arm's own line, so radial motion is impossible.
Just before a singularity, motion is possible but expensive. With the shoulder at θ₁ = 0°, ask the hand to move at 1 cm/s in the −x direction (back towards the base), and compare the joint speeds this needs in poses where the elbow is closer and closer to straight:
θ₂ det θ̇₁ (deg/s) θ̇₂ (deg/s)
90° 80.00 0.00 7.16
30° 40.00 −9.92 24.25
5° 6.97 −65.49 147.66
1° 1.40 −328.25 738.62The hand speed requested never changes, yet the joint speeds explode as the arm straightens. A real controller following a path near a singularity would hit its motor speed limits, jerk, or behave erratically. Practical responses include slowing the hand down near singularities, planning paths that stay away from them, and using modified solvers that accept a small path error in exchange for sane joint speeds.
This is what the explorer's |sin θ₂| reading measures: how far the arm is from singular. Near 1 (elbow at a right angle), the arm is as far from singular as it can be, and both joints can move the hand in any direction without huge joint speeds. (Whether every direction is equally easy also depends on the link lengths.) Near 0, some direction is almost lost.
Explorer 01 — Robotic kinematics
From joint angles to a position, and back again
Fig. — 2-link planar arm · units cm · y up
Joint angles (relative)
More controls
Arm geometry
- End x
- 15.1 cm
- End y
- 26.4 cm
- Distance r
- 30.4 cm
- workspace 5.0–35.0 cm
- |sin θ2|
- 0.87
- well-conditioned
- Tip angle φ
- 95.0°
State
Forward kinematics. Joint angles: joint 1 35°, joint 2 60°. End effector at x 15.1 cm, y 26.4 cm, 30.4 cm from the base. Elbow well-conditioned (|sin θ2| = 0.87).
Forward kinematics. Joint angles: joint 1 35°, joint 2 60°. End effector at x 15.1 cm, y 26.4 cm, 30.4 cm from the base. Elbow well-conditioned (|sin θ2| = 0.87).
How to read this
The base sits at the centre (grid squares are 10 cm). Each thick bar is a link; circles are joints J1, J2. The shaded ring is the workspace: every point the tip can reach with unlimited joint travel. Its outer edge is L1 + L2; the inner hole appears when one link is longer than the others combined.
Arcs show each joint angle. θ1 is measured from the dashed horizontal; θ2 from the dashed extension of link 1. In inverse mode the square is the target (dashed and labelled unreachable when outside the ring), and the arm is solved with the law of cosines. Most targets have two solutions: elbow-up and elbow-down.
Assumptions & limitations
- Ideal rigid links and revolute joints with no mass, friction, backlash, or flex.
- Joints may rotate a full ±180°; real joints have hard limits that shrink the workspace, and links cannot pass through each other or the floor.
- Kinematics only: nothing here says whether the motors are strong or fast enough to hold or reach a pose (that is dynamics).
- Three-link inverse kinematics is made solvable by fixing the tool angle φ; real controllers choose among redundant solutions with extra goals.
- Unreachable targets are projected onto the nearest edge of the reachable ring for display; a real controller would refuse or plan around them.
A glimpse further: forces
The Jacobian has a second job. The same matrix, transposed, converts a force at the hand into the joint torques needed to resist it. One consequence feels surprising at first: near a straight-arm singularity, the arm can resist a large push along its own length with almost no joint torque, because the links themselves carry the load. You will meet this force relationship in more advanced courses; for now, notice that one matrix links speeds and forces.
Recap
A point rotating at ω about a pivot moves at ω × distance, perpendicular to the line from the pivot, with ω in rad/s. For a two-link arm, the hand velocity is the sum of the shoulder's and elbow's contributions, written as J times the joint speeds. The Jacobian's columns are the hand velocities from each joint alone, and J changes with the pose. Its determinant, L₁ · L₂ · sin θ₂, is zero when the arm is straight or folded: a singularity, where some hand direction is impossible and nearby motions need huge joint speeds.
Knowledge check
Check your understanding
Go further
- Wikipedia — Jacobian matrix and determinant ↗
The general mathematical idea behind the robot Jacobian. Uses calculus notation, so treat it as a look ahead.
Lesson materials · free to download
Sign in to track your progress. Reading is free without an account.