Every motor on a typical robot arm is a revolute joint: it rotates about a fixed axis. The tool or gripper at the far end is the last link in that chain. Kinematics answers two inverse questions about that chain. Once you see them clearly, the rest of the machinery — matrices, Jacobians, solvers — is bookkeeping.
The two questions
Forward kinematics (FK). Given the joint angles , where is the end-effector in the base frame? The answer is a pose: position and orientation . The map is unique. One set of angles produces one pose. You multiply transforms.
Inverse kinematics (IK). Given a desired tip pose , which joint angles put the tip there? That map may have many solutions, one, or none — out of reach, or past joint limits.
Those two questions apply to any serial chain: a desk arm, a welding robot, a crane, even a 2D cartoon of sticks on paper. The dimension and the joint count change; the questions do not.
Warm-up: a 2-joint planar arm
Six-degree-of-freedom formulas look dense because they are matrices. On a flat table with two hinges, the same FK is high-school trigonometry. Do this once on paper; everything later is the same idea in 3D.
Put the shoulder at the origin. Link 1 has length , link 2 has . Joint 1 rotates by , joint 2 by relative to link 1. The tip is:
Why add? The second link starts where the first ends. The first term is the elbow; the second is elbow to tip.
Worked numbers with , , , :
- ,
- , ,
Drag the sliders below to see that formula live. The printed should match the drawing, and the readout is the same FK answer packed as a homogeneous transform.
Live FK · 2-joint planar arm
The same answer as a matrix
T₀ᴱᴱ ≈ (2-joint planar FK) [ 0.259 -0.966 0.000 86.315 ] [ 0.966 0.259 0.000 144.547 ] [ 0.000 0.000 1.000 0.000 ] [ 0.000 0.000 0.000 1.000 ] Check: first link ends at (56.29, 32.50)
IK for this arm has a closed form from the law of cosines. Let :
The is elbow-up versus elbow-down — two ways to put the tip at the same . If , the point is outside the reachable ring and IK fails honestly.
Plug in the numbers above and you recover ; then follows from . That is already inverse kinematics: pose in, angles out.
Drag the green target (or use the sliders). The arm solves IK live. The grey dashed arm is the other elbow solution. Drag outside the rings and IK fails ().
Live IK · drag the target
The cosine formula, live
p* = (86.0, 145.0) mm
cos θ₂ = (x² + y² − L₁² − L₂²) / (2 L₁ L₂)
= (86.0² + 145.0² − 4225 − 13456) / 15080
= 10740.0 / 15080 = 0.7122 → |cos| ≤ 1, two elbows
active elbow sign = +1 (up) θ₂ = ±arccos(·)
θ₁ = atan2(y, x) − atan2(L₂ sinθ₂, L₁ + L₂ cosθ₂)
FK check of this q*: tip = (86.00, 145.00) |e| = 0.00 mm
other elbow: θ₁ = 88.2°, θ₂ = -44.6° (grey dashed)A longer 3D arm rarely has an equally simple cosine formula for every joint. The meaning does not change. You still ask “which angles put the tip here?” You answer with a matrix chain for FK and, when needed, a numerical solver for IK.
What a 4×4 homogeneous transform does
Section two already did forward kinematics in 2D: given , add the sticks. A homogeneous transform is not a third kind of kinematics. It is the same idea rewritten so it still works when the chain leaves the page — pan, lift, roll, full 3D.
A rigid link has its own “here”: the shoulder’s here, the elbow’s here, the tip’s here. Those heres differ in two ways only:
- Where that piece sits — a translation
- Which way it faces — a rotation
A 4×4 homogeneous transform packs both into one object. Think of it as a sticky note on a link:
If you are standing at the previous joint, take this many millimetres in this direction, then spin this many degrees — now you are standing at me.
Why 4×4, not 3×3? A 3×3 can spin a point but cannot slide it. A 3-vector can slide but cannot spin. One multiply then means “move from this joint to the next.” Walking the whole arm is applying those notes in order — which in algebra is multiplying them.
The top-left () is orientation. The right column is the origin. The bottom row is always so slide and spin stay in one multiply.
Apply to a point written as a 4-vector:
Compose frames by multiplying. If is “ as seen from ” and is “ as seen from ,” then:
Order matters. Parent-then-child is the physical chain: base, then joint 1, then joint 2, and so on. Six motors does not mean a 6×6 pose matrix. Each joint still has its own ; the product is still , because the tip still has one position and one orientation in 3D space.
| If you skip this | What goes wrong later |
|---|---|
| Treat as mysterious symbols | You miss that FK is only sticking notes together from base to tip |
| Add poses instead of multiplying them | Angles do not add like lengths in 3D |
| Mix order ( vs ) | The tip flies to the wrong place |
| Cannot read out of | You cannot check height, reach, or alignment |
One joint’s matrix, then the chain
Each revolute joint contributes one matrix . In the Denavit–Hartenberg (DH) convention, that note is four tiny moves — fixed link geometry times the live motor angle:
| Piece | What it does | Changes when you move the motor? |
|---|---|---|
| Walk along the link length | No | |
| Twist so the next hinge points the right way | No | |
| Slide along the hinge axis | No | |
| The motor turning | Yes — this is |
Rule of thumb: if the letter has a joint index and depends on one angle, it is an . If it has a from–to pair and is a product, it is a .
Walk from the base (frame 0) out to the end-effector by multiplying one at a time:
That product is the tip pose. You do not invert anything to read it. Copy the right-hand column for position , and the top-left for orientation .
Why not one giant formula for like the 2-joint warm-up? You can, after multiplying all . It becomes a mess of nested sines. Keeping small crates is shorter, matches how robot descriptions (URDF and friends) store the chain, and is what kinematics libraries do.
What FK is for in practice
Once you can compute from measured or recorded joints, you can ask ordinary engineering questions without solving IK:
- Height. Is the tip near the object height at the grasp frame?
- Target alignment. Is the tip over the intended drop or weld point?
- Reachability. Is within the sum of the long links?
- Clearance. After a pick, did rise above the table — or did the tip drag sideways?
Those checks use joints you already have. Finding new joints that would reach a chosen is the inverse problem.
Inverse kinematics as a search
FK is unique. IK is the awkward reverse. Many angle combinations can share one tip pose. Sometimes none work.
In one sentence: find such that FK lands near the chosen point , without breaking motor limits.
Jaw open/close (or any DOF that does not move the tool frame) is usually a separate map, not part of this position puzzle.
IK can fail honestly: target beyond maximum reach, behind the pedestal, or past a joint limit. That is a layout or task problem, not a bug in the formula. A good solver must say “no” rather than invent a pose that would snap a servo.
Numerical IK: nudge, measure, repeat
For more than a couple of planar joints, you usually do not magically invert FK. You nudge the motors a little, ask FK where you landed, repeat until the tip is close enough to . That loop is numerical IK.
The error is the leftover miss:
The Jacobian is a table of “what if I twitch one motor?” Each column is one servo: a tiny turn of that motor moves the tip in this Cartesian direction. For position-only IK on motors, is . It grows with joint count; the pose matrix does not.
On the 2-joint warm-up the same table is small enough to write out:
You want a small joint change such that . When is wide (more knobs than directions), many could work. A common compromise is damped least-squares:
is a small cushion. If and the arm is stretched (a singularity), can explode. Think of as “do not panic when the cheat sheet is unclear.”
Each iteration:
- Start from current
- FK: where is the tip?
- Form the miss
- Compute
- Set , clip to joint limits
- Stop when is tiny, or give up after too many tries
Watch that loop on the same 2-joint arm. Drag the target, then Step once to apply one , or Solve until the miss is under . This is the same recipe a 6-DOF solver uses; here is so every number stays readable.
Live numerical IK · Jacobian DLS
Iteration log
q starts at (15°, 25°). Each step: e = p* − FK(q), Δq = J⁺ e.
The starting guess matters. From a folded posture the solver may pick the other elbow configuration or get stuck. When the real arm is in the loop, seed from measured joints; when replaying without feedback, seed from the previous solution.
After exists, motion control interpolates from today’s joints to that goal. That interpolation is neither FK nor IK — it is the sequel to IK. Learning policies that copy joint trajectories from demonstration skip the online IK path entirely; they still benefit from FK as a check that the demonstrated joints made geometric sense.
Symbol cheat-sheet
| Symbol | Meaning |
|---|---|
| , | Joint vector / -th motor angle (use radians in the formulas) |
| One joint’s sticky note | |
| Full FK product: tip pose in the base frame | |
| , | Orientation and translation inside a homogeneous transform |
| , | Tip position from FK; desired tip position for IK |
| Cartesian miss | |
| , | Jacobian and (damped) pseudoinverse |
| Rough reach bound — sum of the long link lengths |
Takeaways
- FK multiplies joint transforms and reads the tip. Unique, cheap, always available once you have .
- IK searches for angles that realise a pose. Multiple, one, or zero answers — and failure is information.
- The is a packing crate for “slide + spin.” Six joints still yield one tip pose; the Jacobian is what grows with joint count.
- Start with the 2-joint arm on paper. Every longer chain is the same two questions with more sticky notes.
Angles in, pose out. Pose in, angles out. Everything else is how carefully you ask those two questions in three dimensions.
Filed under
- Kinematics
- Robotics
- Linear algebra
- Homogeneous transforms