Visual explainer
Forward and Inverse Kinematics
Predict end-effector positions with forward kinematics and solve multi-branch joint angles with analytical inverse kinematics.
Forward kinematics predicts where the tip lands from known joint angles. Inverse kinematics finds joint angles for a target; even a two-link arm can have two answers. This page solves tip position, not a complete pose including orientation.
The two equal-length paths on the right share a base and a diamond target. A known posture determines one tip position, but several postures can determine the same position. Forward kinematics is therefore a function, not generally a one-to-one function.
Add the link vectors
Use a synthetic planar arm with two one-metre links. Measure shoulder angle counterclockwise from positive x and elbow angle relative to the first link. World y points up. At , , link one contributes metres and link two contributes metres. The drawing uses 180 pixels per metre.
The second link uses the sum of joint angles because its orientation is relative to the first link.
Check the reachable region
This overview zooms out to 65 pixels per metre. With unrestricted revolute joints and no obstacles, position reachability requires , where . Equal links make the inner radius zero. Our target has m and lies inside the two-metre boundary. The cross at lies outside. Joint stops, collisions and a requested tool orientation can exclude positions that pass this radial test.
Solve the elbow bend
Returning to 180 pixels per metre, the base, elbow and tip form a right triangle. The dashed side joins the base to the target. The cosine law gives
Thus within the principal joint-angle range. The bend magnitude is fixed; its sign selects a branch.
Keep both inverse solutions
Branch A, solid, uses with elbow . Branch B, dashed, uses with elbow . Both tips reach , but their final link orientations differ: 90 degrees versus zero. A position solution does not guarantee an arbitrary tool orientation.
Recover the shoulder angle
Let be target bearing. The link triangle contributes signed offset . Then . For A, both angles are 45 degrees, leaving shoulder angle zero. The arc shows the offset between the horizontal upper arm and the sightline. For B, , giving .
Verify with forward kinematics
The computed dot lands inside the target diamond. For A, and . For B, and . These are exact ideal-model results. Numerical implementations compare a residual against tolerance; rounded angles need not give exact equality.
Select a valid posture
The outlined obstacle contains A's elbow at , while B clears it. This changes the selection without changing the target. Joint limits and travel from the current posture also matter. A collision-free final posture still needs a collision-free path from the starting posture; IK alone does not supply one.
Map rates into tip motion
The arm remains at A. A counterclockwise elbow rate makes the vertical forearm's tip move left instantaneously. With angles in radians, the position Jacobian is the derivative of the two FK equations:
At A, m/rad. Holding the shoulder still and setting rad/s gives m/s. The 72-pixel tangent arrow uses 360 pixels per m/s; it is a velocity vector, not a second arm position. The elbow arc only identifies the rotating joint.
Where it breaks
The final frame changes posture to and uses 140 pixels per metre. Both links lie along x. Here has rank one: joint rotations can generate vertical tip velocity, but no horizontal tip velocity. The dashed request terminates at a cross because it is unavailable.
In general . Near a singularity, requested velocity components along a weakening direction can require large rates. At the exact singularity an incompatible request has no finite solution. Compatible vertical motion remains possible. A pseudoinverse, damping, rate limits or a changed path can manage the control problem, but cannot restore a lost instantaneous direction.
The Quick Version
- Forward kinematics adds link vectors for known joint angles.
- Elbow angles are relative to the preceding link.
- Unrestricted equal links reach a disk of radius two metres.
- The cosine law fixes the elbow bend magnitude.
- Two branches can share a tip position but differ in orientation.
- Shoulder angle subtracts a signed triangle offset from target bearing.
- Forward substitution checks the inverse solution against its target.
- Obstacles and joint limits can reject a mathematical branch.
- The Jacobian maps joint rates to instantaneous tip velocity.
- Singular configurations lose particular velocity directions.
Sources
CMU two-link kinematics derives the planar construction using a different angle convention. Modern Robotics on singularities explains Jacobian rank loss and unavailable directions. All numbers here belong to the synthetic fixture above.