Inverse kinematics
838 words · 5 min read · 2 sources
Inverse kinematics is the math a robot uses to figure out which joint angles will put its hand exactly where you want it. It's the difference between "move forward" and "touch this specific point."
Inverse kinematics is the math a robot uses to figure out which joint angles will put its hand (or end-effector) exactly where you want it. It's the difference between "move forward" and "touch this specific point in 3D space."
🇮🇳 In India
IIT Madras-built robot arms used in pharma packaging use IK solvers to pick vials at angles, no matter where the conveyor places them.
🤯 For a 6-axis robot arm, the inverse-kinematics solver often has 16 mathematically valid solutions — the controller has to pick the safest one.
🎯 Quick challenge
What is the opposite of inverse kinematics?
Inverse kinematics is the math a robot uses to figure out which joint angles will put its hand (or end-effector) exactly where you want it. It's the difference between "move forward" and "touch this specific point in 3D space."
The simple case: forward kinematics
If you know all the joint angles of a robotic arm, calculating where the hand ends up is straightforward — just add up the rotations and translations. That's forward kinematics: angles in, position out. Computers can do this in microseconds, even for arms with seven joints.
The hard case: inverse kinematics
But what we actually want is the opposite: given a target position for the hand, what joint angles get us there? That's inverse kinematics (IK). And it's hard, for three reasons:
-
Multiple solutions. For most arms, there's more than one way to reach the same point. Your own arm: you can touch your nose with your elbow up or your elbow down. Two valid solutions. A 7-joint arm has roughly infinite solutions for most targets.
-
No solutions. Some points are unreachable (out of arm length, or blocked by the body). IK has to detect this and give a sensible failure.
-
The math is nonlinear. Forward kinematics is a sequence of matrix multiplications. IK is solving for the angles inside those matrices — a much harder algebraic problem.
How robots actually solve it
Analytical IK — for simple arms (up to 6 joints, no funny geometry), there's a closed-form algebraic solution. Compute it in microseconds.
Numerical IK — for complex arms (7+ joints, humanoid arms, robots with redundancy), the solver iterates: start with a guess, see how far off the hand is, adjust the angles to reduce the error, repeat. Converges in milliseconds.
Neural IK — newer: train a neural network to learn the inverse mapping from data. Less accurate but much faster, and handles redundancy gracefully.
The Jacobian: how numerical IK actually works
The workhorse of numerical IK is the Jacobian matrix J, which links small joint changes to small end-effector changes:
ẋ = J(θ)·θ̇ # end-effector velocity = Jacobian × joint velocities
To move the hand toward a target, you invert that relationship — but J is usually not square (a 7-joint arm mapping to a 6-D pose isn't invertible), so solvers use the pseudo-inverse J⁺:
θ̇ = J⁺·ẋ_error # step the joints to shrink the position error, then repeat
Take a small step, recompute the error, iterate until the hand reaches the target. This is Newton-style root finding on the forward-kinematics function.
Singularities: where IK breaks
At certain configurations — an arm stretched fully straight, or two joint axes lining up — the Jacobian loses rank. Near these singularities, J⁺ blows up and demands enormous, unsafe joint velocities to make a tiny Cartesian move (think of the "gimbal lock" wrist flip on an industrial arm). The standard fix is damped least squares (the Levenberg-Marquardt IK): add a damping term λ so the solver trades a little accuracy for bounded, stable joint speeds:
θ̇ = Jᵀ(J·Jᵀ + λ²I)⁻¹·ẋ_error
Redundancy and the null space
A 7-DOF arm reaching a 6-D pose has one extra degree of freedom — a whole null space of joint motions that don't move the hand at all. This is a gift: you can move the elbow to dodge an obstacle, stay away from joint limits, or keep away from singularities while the hand holds its target. Solvers exploit it with a null-space projection term, which is exactly how humanoid arms look natural and avoid self-collision.
Why this matters for humanoids
A humanoid robot has roughly 30 joints. Getting its right hand to a specific point isn't "pick angles for the 6 joints in the arm" — it's "pick angles for 30 joints such that the whole body keeps its balance, the legs stay where they are, and the left hand doesn't bump into the chest". This is called whole-body IK. It's the math problem that Atlas, Optimus, and Figure 03 are solving 500-1,000 times per second.
Check your understanding
1. Why can a 7-joint arm reach the same point infinitely many ways, and how is that useful? It has one more degree of freedom than the 6-D task needs — a null space of motions that don't move the hand. You exploit it to avoid obstacles, joint limits, and singularities while holding the target.
2. Your arm demands wild joint speeds as it approaches a fully-extended pose — what's happening and what's the fix? You're near a singularity where the Jacobian loses rank and J⁺ explodes. Use damped least squares (add a λ term) to keep joint velocities bounded at the cost of a little accuracy.
3. When would you choose analytical IK over numerical IK? For a simple arm (≤6 DOF) with clean geometry, a closed-form solution is exact and runs in microseconds — no iteration, no convergence worries. Numerical IK is for redundant/complex arms where no closed form exists.
The simplest place to see IK in action is a robotic arm with 6 joints. We'll build one in the Wire 06 course.
Ask R2 Co-pilot anything you didn't understand about Inverse kinematics. It'll explain it plainly.
Learn this in the Academy
🔥F-02: Robot Manipulation with MoveIt2
Hands-on lesson · Forge track
Keep going
Atlas (Boston Dynamics)
Atlas is Boston Dynamics' bipedal humanoid robot — the most acrobatic robot ever built, and now an electric ma…
RobotOptimus (Tesla)
Optimus is the humanoid robot Tesla is building to do general-purpose work — in their factories first, and eve…
ConceptServo motor
A servo motor is a small motor that knows its own angle — you tell it where to point, and it goes there and ho…
Last updated · 2026-05-19
Community discussion
0 questions & insightsLoading discussion…
Spotted something off? Report an error →