# Inverse kinematics **Inverse kinematics** (IK) is the mathematical process of computing the joint values of a [[Kinematic_chain|kinematic chain]]—a robot [[Manipulator_(device)|manipulator]], say, or an animated character's arm—that place the end of the chain at a desired position and orientation. It is the mirror problem of [[Robot_kinematics|forward kinematics]], which goes the other way: given the joint values, forward kinematics finds the end-effector pose by straightforward trigonometry. Inverse kinematics is the harder direction. A target may be unreachable, reachable by exactly one set of joint values, or reachable by many—sometimes infinitely many—and telling which case applies, then finding a solution, is most of what the subject is about.[^craig][^lynch-park] The primary microsim on this article is a two-link planar arm: drag the target and watch the arm reach it two ways at once, elbow up and elbow down, while a chart alongside tracks how close the arm is to a singularity—the configuration where a small step of the target demands an impossibly large joint motion. Robot manipulators and animated skeletons are not the only kinematic chains a designer poses this way. The same equations, run on a vehicle or a camera rig instead of an arm, recover the trajectory a virtual camera must have followed to produce a given shot—useful wherever a scene is built backward from what the audience is meant to see. ## Robotics In [[Robotics|robotics]], inverse kinematics turns a desired pose of an [[Robot_end_effector|end effector]]—a gripper, a welding head, a drill—into the joint angles that put it there.[^craig] The distinction matters because a robot's task is defined at the end effector while every motor sits at a joint: a welding path is drawn in the world, not in joint space, and something has to translate between the two. [[Motion_planning|Motion planning]] supplies the path the end effector should follow; inverse kinematics turns that path into a joint-angle trajectory, which becomes the [[Actuator|actuator]] commands the controller actually executes.[^lynch-park] The problem was solved computationally before it was solved cheaply. Donald Pieper's 1968 Stanford thesis worked out when a six-joint arm admits a closed-form solution at all, and found that a wrist whose last three joint axes meet at one point—a "spherical wrist"—decouples the problem into a solvable position part and a solvable orientation part.[^pieper] That geometric trick is still why most six-axis industrial arms are built the way they are (see below, under "Ortho-parallel basis and a spherical wrist"). Serial arms and parallel mechanisms invert each other's difficulty. A serial [[Manipulator_(device)|manipulator]] computes its forward kinematics easily—multiply the joint transforms down the chain—while its inverse kinematics can have several branches or none. A [[Parallel_manipulator|parallel manipulator]] such as a Stewart platform is the opposite: given a desired platform pose, each leg's length follows directly, while recovering the pose from the leg lengths is the hard problem. Once a joint-angle trajectory is fixed by either route, the torques needed to move the arm along it are a separate calculation, belonging to [[Lagrangian_mechanics|manipulator dynamics]] rather than to kinematics. ## Kinematic analysis Inverse kinematics is a special case of the kinematic analysis of a constrained system of rigid bodies: a [[Kinematic_chain|kinematic chain]] whose links are connected by joints that each remove some freedom of motion. The chain's kinematic equations express the pose of its end in terms of its joint parameters; the independent parameters left over after every joint constraint is applied are the system's [[Degrees_of_freedom_(mechanics)|degrees of freedom]].[^mccarthy] Whether an analytic solution exists at all turns on comparing that count to the six numbers—three position, three orientation—needed to fix a pose in space. A chain with exactly six well-arranged joints generically has a finite number of exact solutions; add a seventh joint and the chain becomes kinematically redundant, with a whole family—usually a continuum—of joint configurations reaching the same target. Redundant chains are common by design (a human arm has seven meaningful rotational degrees of freedom against a hand's six-number pose),[^craig] and for them a single closed-form answer does not exist: the choice among the family is resolved by an extra criterion—minimum joint motion, obstacle clearance, staying clear of joint limits—layered on top of the kinematic equations themselves. ## Inverse kinematics and 3D animation Outside robotics, inverse kinematics is a standard tool of character animation and games, where it lets an artist or a [[Physics_engine|physics engine]] pose a figure by moving its extremities rather than dialing in every joint angle by hand.[^aristidou-survey] A character's skeleton is a [[Kinematic_chain|kinematic chain]] exactly as a robot's arm is; posing it by forward kinematics means setting every joint angle directly, which is natural for broad, arcing motion but tedious for a precise target—a foot that must land flat on uneven ground, a hand that must find a doorknob. Inverse kinematics inverts the process: the animator places the hand or foot, and the solver works back to shoulder, elbow and wrist, or hip, knee and ankle, as with a [[Player_character|game character]] or a [[Ragdoll_physics|ragdoll]] rig. Because the solved pose must still look like a body and not an abstract linkage, production IK systems constrain the search to angles a real joint could reach—an [[Anthropomorphism|anthropomorphic]] limit on the elbow or knee that keeps the solver from bending a limb backward even when the unconstrained mathematics would allow it.[^aristidou-survey] The same machinery, pointed at a chain that represents a camera rig rather than a limb, recovers the camera path a shot implies, which is part of what lets [[Computer-generated_imagery|computer-generated imagery]] hold its [[Perspective_(graphical)|perspective]] correctly as a virtual camera moves past a landscape. [[Computer-aided_design|CAD]] assemblies use the same idea outside animation entirely: dragging one part of a constrained assembly and letting the solver find every other part's position is inverse kinematics applied to mechanical design rather than to a character.[^lynch-park] ## Analytical solutions to inverse kinematics An *analytical* solution is a closed-form expression that takes the desired end-effector pose as input and returns joint values directly, with no iteration. Where one exists it is typically much faster than a numerical solver and it returns every solution branch rather than whichever one a search happened to converge on—at the cost of existing only for particular, well-behaved chains.[^craig] ### Generic solutions The clearest case is a two-link planar arm, which is exactly what this article's primary microsim animates. With link lengths l1 and l2 and a target at (x, y) measured from the shoulder, the law of cosines gives the elbow angle directly: `cos t2 = (x^2 + y^2 - l1^2 - l2^2) / (2 l1 l2)` A target inside the reach annulus |l1 − l2| ≤ r ≤ l1 + l2 has exactly two solutions for t2, equal in magnitude and opposite in sign—the elbow-up and elbow-down branches the microsim draws as a solid arm and a ghost. A target outside that annulus has none: the right-hand side of the equation for t2 falls outside [−1, 1], and the arm can only stretch toward the target along the boundary circle, elbow locked straight. That boundary is also where the arm's manipulability collapses (see below, under "The Jacobian inverse technique"), so the same inequality marks both "unreachable" and "about to go singular." A general six-joint arm is solved the same way in spirit—decompose the pose into pieces small enough to close algebraically—but the algebra is longer and, per Pieper's criterion, only guaranteed to close when three consecutive joint axes intersect or run parallel.[^pieper] ### Ortho-parallel basis and a spherical wrist Most six-axis industrial arms are built with exactly that structure: three joints whose axes position the wrist center (the "ortho-parallel basis"), and three further joints whose axes intersect at a single point (the spherical wrist) orient the tool about it. The construction decouples a six-unknown problem into a three-unknown position problem followed by a three-unknown orientation problem, each solvable in closed form; the full pose problem for such an arm can have as many as eight distinct solution branches.[^brandstotter] The same ortho-parallel-with-spherical-wrist family is what [[Serial_manipulator|serial industrial manipulators]] have used since Pieper's thesis made the geometry explicit.[^pieper] ## Numerical solutions to IK problems Most kinematic chains are not so accommodating. A redundant arm, a chain whose joint axes do not meet the ortho-parallel pattern, or a chain with prismatic and revolute joints mixed arbitrarily generally has no closed-form inverse, and the practical answer is to linearize the forward-kinematics equation—by a [[Taylor_series|first-order Taylor expansion]] about the current pose—and solve the linear approximation [[Iterative_method|iteratively]], repeating until the error is acceptably small.[^lynch-park] ### The Jacobian inverse technique Write the forward-kinematics map as p(theta), a function from the m joint values to the end-effector position. Near the current configuration theta0, a small joint step dtheta produces a hand-velocity step dp ≈ J(theta0) dtheta, where J is the [[Jacobian_matrix_and_determinant|Jacobian matrix]] of partial derivatives dp_i/dtheta_k. Inverting that relationship—using the Moore–Penrose pseudoinverse of J, computed by [[Singular_value_decomposition|singular value decomposition]] when the chain is redundant, since a non-square J has no ordinary inverse—gives an estimate of the joint step that would close the remaining position error, and repeating the step, a form of the [[Newton's_method|Newton–Raphson]] iteration, walks the arm to the target.[^lynch-park] The determinant of J, defined only for a chain whose joint count matches its pose's degrees of freedom, is the quantity this article's microsim reads out directly: for the two-link arm, `det J = l1 l2 sin t2`, and the sim's manipulability ellipse—the image under J of a unit circle of joint rates—stretches into a line exactly where det J reaches zero. That is the same reach-boundary singularity the closed-form branch loses. A Jacobian-inverse solver run near such a configuration produces huge joint-rate estimates from a small position error, which is why production solvers damp the inverse, trading a little accuracy for stability, rather than inverting J outright, and why second-order methods that use the [[Hessian_matrix|Hessian matrix]] instead of a single linear step, and variants such as [[Levenberg–Marquardt_algorithm|Levenberg–Marquardt]], tend to converge in fewer iterations near a singularity than the plain Jacobian inverse.[^lynch-park] The manipulability ellipse and the vanishing of det J are explored on their own terms, with the same two-link figure retuned to foreground them, on [[Jacobian_matrix_and_determinant]]. ### Heuristic methods A second family of iterative solvers skips the Jacobian altogether and instead applies a simple geometric rule at each joint in turn. Cyclic [[Coordinate_descent|coordinate descent]] (CCD) sweeps from the end effector back to the base, rotating one joint at a time to point the chain as directly as possible at the target before moving to the next. FABRIK—forward and backward reaching inverse kinematics, published by Andreas Aristidou and [[Joan_Lasenby|Joan Lasenby]] in 2011—instead treats each link as a rigid rod and repeatedly re-centers the chain in two passes, one working from the target back to the base and one from the base back out, snapping each joint to the correct link length as it goes.[^fabrik] Heuristic solvers are cheap per iteration and tolerant of joint limits and obstacles bolted on as extra checks, at the cost of a guarantee: unlike an analytical solution, neither CCD nor FABRIK promises to find every reachable solution, only some solution, and neither is guaranteed smooth between two nearby targets—a property that matters if the solver runs inside a fast [[Control_loop|control loop]] rather than once per animation frame.[^fabrik] ## Microsim *This section is specific to Wikitube.* <!-- ROBSIM:Inverse_kinematics --> The figure is a two-link planar arm with a draggable target. Two sliders set the target's x and y position; a third resizes the forearm, l2, which redraws the reach annulus in real time. A branch selector switches which of the two law-of-cosines solutions is drawn solid, elbow up or elbow down, while the other is drawn as a faint ghost—both are always computed, so switching the selector never triggers a new solve, only a different choice of which existing solution to show. A toggle turns the manipulability ellipse on or off, and a small chart plots det J against the target's distance from the base, tracking the arm from fully extended (det J = 0 at both ends of the chart) to its most dexterous configuration at the peak. What the figure shows directly: the two solution branches of the closed-form two-link inverse (see "Generic solutions" above), the shape and collapse of the velocity ellipse J J^T that opens the Jacobian-inverse discussion (see "The Jacobian inverse technique" above), and the geometric meaning of a singularity as the arm approaching the reach circle from inside. What it does not show: a redundant chain or an iterative numerical solve in motion—the arm here always has a closed-form answer, so the figure is the analytical half of the article rendered live, while the numerical and heuristic methods above are worked in prose rather than animated on this page. The same two-link solver, retuned to foreground the Jacobian rather than the arm, is the default view on [[Jacobian_matrix_and_determinant]]; retuned again around reach and payload rather than branch geometry, it is the figure on [[Robotic_arm]]. *Try:* Drag the target out past the reach circle and watch the arm lock straight and the ellipse flatten to a line as det J falls to zero on the chart; then bring the target back in and flip the branch selector to see the ghost arm and the solid arm trade places. ## Wikipedia : Wikitube This article is Wikitube's pair of the English Wikipedia article [Inverse kinematics](https://en.wikipedia.org/wiki/Inverse_kinematics), pinned at [revision 1361289852](https://en.wikipedia.org/w/index.php?title=Inverse_kinematics&oldid=1361289852) (June 26, 2026). The section skeleton above mirrors that revision; the prose is Wikitube's own. ## See also - [[Robot_kinematics]] — the forward problem this article inverts - [[Jacobian_matrix_and_determinant]] — the matrix behind Numerical solutions to IK problems, with the manipulability ellipse as its own default figure - [[Robotic_arm]] — the same two-link solver, reframed around reach and payload - [[Serial_manipulator]] — the ortho-parallel, spherical-wrist arms Analytical solutions to inverse kinematics describes - [[Parallel_manipulator]] — the mechanism family whose inverse and forward problems trade places - [[Degrees_of_freedom_(mechanics)]] — what decides whether a closed-form solution can exist - [[Lagrangian_mechanics]] — the torques a solved joint trajectory still has to be given ## References [^craig]: Craig, John J. *Introduction to Robotics: Mechanics and Control*, 4th ed. Pearson, 2018, ch. 4 ("Inverse Manipulator Kinematics"). [^lynch-park]: Lynch, Kevin M., and Park, Frank C. *Modern Robotics: Mechanics, Planning, and Control*. Cambridge University Press, May 25, 2017, ch. 6 ("Inverse Kinematics"). ISBN 978-1-107-15630-2. [^pieper]: Pieper, Donald L. "The Kinematics of Manipulators Under Computer Control." PhD thesis, Stanford University, Department of Mechanical Engineering, October 24, 1968. [^brandstotter]: Brandstötter, Mathias; Angerer, Arthur; Hofbaur, Michael. "An Analytical Solution of the Inverse Kinematics Problem of Industrial Serial Manipulators with an Ortho-parallel Basis and a Spherical Wrist." *Proceedings of the Austrian Robotics Workshop 2014*, Linz, Austria, May 22–23, 2014. [^aristidou-survey]: Aristidou, Andreas; Lasenby, Joan; Chrysanthou, Yiorgos; Shamir, Ariel. "Inverse Kinematics Techniques in Computer Graphics: A Survey." *Computer Graphics Forum* 37, no. 6 (2018): 35–58. https://doi.org/10.1111/cgf.13310 [^fabrik]: Aristidou, Andreas, and Lasenby, Joan. "FABRIK: A Fast, Iterative Solver for the Inverse Kinematics Problem." *Graphical Models* 73, no. 5 (2011): 243–260. https://doi.org/10.1016/j.gmod.2011.05.003 [^mccarthy]: McCarthy, J. Michael. *Introduction to Theoretical Kinematics*. MIT Press, 1990. ## External links - [FABRIK project page](http://andreasaristidou.com/FABRIK.html) — Aristidou and Lasenby's reference implementation and demos - [Modern Robotics companion site](http://modernrobotics.org) — free supplement to Lynch and Park's textbook, including the inverse-kinematics chapter <!-- hub_tags: Robotics, Kinematics -->