ENGR 101 SESSION 04
Brian Jo, Kenneth Parker, Jeff Irlande
Kinematics
Kinematics is the math we use to describe where things are, which way they're facing, and how they're moving — without worrying about the forces that push or pull them. We'll build up the toolkit that engineers use for robot arms, video game characters, drones, and even your own arm: coordinate frames, moving and turning, configuration space, forward and inverse kinematics, and a peek at the Jacobian.
TODAY'S AGENDA

No sections found on this page yet.

What is kinematics?

Describing motion without asking why

KINEMATICSMOTION
Imagine a robot arm at a candy factory. It needs to know exactly where a candy is, how to turn its gripper to grab it, and which way to bend its joints to get there.

Every one of those is a kinematics problem.

Kinematics asks: "What motion is happening?"
Dynamics asks: "What forces are causing it?"

We're only asking the first question today. Kinematics shows up everywhere: robot arms, video game animation, drones, self-driving cars, even the characters in your favorite game.
A robot arm sorting candy — a perfect kinematics problem

Coordinate frames

Where is 'here', exactly?

COORDINATE FRAMESREFERENCE FRAMES
If I say a ball is at is that enough information? Three steps from where? Facing which way?

A location only makes sense once we pick a starting point and a set of directions. Together, that's called a coordinate frame: an origin (a "zero point") plus axes pointing in specific directions.
Two people, two different rulers, describing the same dot on the wall
Suppose Alice measures from the door of the room, and Bob measures from the window. The dot on the wall doesn't move — but their numbers for it are totally different: Neither answer is "wrong." They're just two honest descriptions of the same point, from two different rulers. The little letter in front ( or ) just reminds us whose ruler we used.

Sliding a frame: translation

Moving without turning

TRANSLATIONCOORDINATE TRANSFORMATIONS
Suppose frame 's origin sits 4 steps over and 1 step up from frame 's origin: and in Bob's frame, a point is at
If both rulers point the same direction (nobody rotated anything), converting is just addition — like adding two trips end-to-end:

Sliding a frame: translation

Drag the teal frame B around. Click anywhere to place (or move) the point, or drag it directly once it exists. Watch how ᴬp always equals ᴬd_B + ᴮp.

x_Ay_AAᴬd_Bx_By_BB
ᴬd_B [4, 1]

Click anywhere on the grid to place a point.

But what if Bob's ruler isn't just moved — what if it's also spun around?

Turning a frame: rotation matrices

Describing a spin with numbers

ROTATIONMATRICES
A rotation matrix is a grid of numbers that tells us how one frame is turned compared to another.

In 2D, spinning counterclockwise by angle uses:
To turn a point from frame into frame , multiply:
Example: spin a point at
A point at (2,0) spun 90° counterclockwise lands at (0,2)
A cool fact: undoing a rotation is easy — just flip the matrix (swap its rows and columns), written . In 3D, the whole collection of possible rotation matrices has a name: .
So where do and actually come from? Let's build the matrix from scratch instead of just memorizing it.

Start with the plain definition of sine and cosine you already know: on a circle of radius 1, if you sweep counterclockwise from the positive -axis by an angle , you land at the point
This comes from the definition of cosine and sine.

Now think about Frame . Before we rotate anything, its -axis points along — a unit-length arrow sitting at angle on that same circle. Once we spin Frame by , that arrow is still unit-length, just now sitting at angle :
That's the first column of the rotation matrix, and we got it for free just from the definition of the unit circle.

What about Frame 's -axis? It's always exactly counterclockwise from its own -axis — that never changes, no matter how much we spin. Here's a handy geometric shortcut: rotating any vector by counterclockwise gives — just swap the two numbers and flip the sign of the new first one. Apply that shortcut to :
That's the second column.
Now for the payoff. A point written in Frame 's coordinates, , is really just an instruction: "walk steps along , then steps along ." Since we now know exactly where those two axes point using Frame 's ruler, we can just add the trip up:
Multiply out and collect the and parts separately:
Stack those two equations into a grid of numbers times a column vector, and you've just derived the rotation matrix yourself:

So a rotation matrix's columns are literally the unit axes of Frame , written using Frame 's ruler. And because those axes always stay perpendicular and unit-length, flipping the matrix (its transpose ) exactly reverses the spin.

A rotation matrix isn't just a grid of magic numbers — its columns are literally the unit axes of Frame written down using the coordinate ruler of Frame . The first column tells you where Frame 's -axis points, and the second column tells you where its -axis points.Because these axes remain perpendicular and unit-length no matter how much you turn them, flipping the matrix upside down (taking its transpose ) perfectly reverses the rotation.

Turning a frame: rotation

Drag the teal handle to spin frame B around the shared origin. Click anywhere to place a point (it stays physically fixed). Watch how ᴬp = R(θ) ᴮp, and how the dotted lines show cos θ and sin θ as B's axes swing across A's axes.

θcos θsin θ−sin θcos θx_Ay_Ax_By_B
θ = 35°
θ 35°
cos θ, sin θ 0.82, 0.57

Click anywhere on the grid to place a point.

Rotating in 3D

Spinning around x, y, or z

3D ROTATIONROTATION MATRICES
In 3D there isn't just one way to spin — you can spin around the -axis, the -axis, or the -axis, just like a plane can roll, pitch, or yaw.

Wait — why is 's pattern backwards? Look closely: in and , the minus sign sits in the upper-right corner of the little 2×2 block and the plain sits in the lower-left. In , it's flipped: is upper-right and is lower-left. That's not a typo — it happens for a real geometric reason.

Here's the key idea: rotating around one axis always mixes the other two. Which one turns into which is set by the right-hand rule — point your right thumb along the positive axis you're spinning around, and your fingers curl in the direction of positive rotation. That last one is the whole story. The three axes take turns in a repeating cycle:
Spinning around pushes toward (the cycle's next step). Spinning around pushes toward (also the next step). But spinning around pushes toward — the cycle wrapping back around past , not the tidy " toward " you might guess by just skipping the middle letter.

Now here's the catch: no matter which axis we spin around, we always write the matrix using the same fixed left-to-right, top-to-bottom order: . For and , the pair being mixed already comes in that natural order ( then ; then ), so the familiar pattern drops in unchanged. But for , the pair being mixed is really , and we're forced to write it in the "wrong" order, , to match everyone else's layout. Writing a rotation block with its two axes swapped is exactly the same as taking its transpose — and transposing a 2D rotation block flips the sign of both entries.

You can see it directly. If 's rotation followed the same naive pattern as the other two, it would incorrectly look like:
compared to the real
— an exact sign swap on the two terms, precisely because we wrote a pairing in order.
Chain them together to build any orientation you want:
Rotating a box around its x, y, and z axes

Order matters!

Why 3D rotations aren't like ordinary addition

ROTATION ORDER3D ROTATION
Here's something surprising: rotating around and then gives a different final orientation than rotating around and then .
This isn't true for regular numbers — 3+5 is the same as 5+3 — but it's true for rotations, because each new rotation happens to the object after it's already been turned by the last one.
Two rotation orders on the same box produce two different final orientations

Roll, pitch, yaw & gimbal lock

Two ways to stack up rotations

EULER ANGLESROLLPITCHYAWGIMBAL LOCK
There are two common ways to describe a sequence of turns.

With fixed-axis rotations, every spin happens around the room's axes, which never move.
With Euler-angle rotations, each spin happens around the object's own axes, which move along with it after every turn.

Airplanes make this intuitive:

  • Roll: tipping side to side
  • Pitch: nose up or down
  • Yaw: turning left or right
Roll, pitch, and yaw on an airplane(?)
(What an unusual airplane!)

These angles are easy to picture, but they have a famous flaw called gimbal lock: at certain orientations, two of the three rotation axes line up on top of each other, and you suddenly lose the ability to turn one whole direction — even though the object itself is perfectly fine.
Gimbal lock in an airplane

Degrees of freedom & configuration space

How many numbers does it take to describe a system?

CONFIGURATION SPACEDEGREES OF FREEDOM
A bead sliding along a wire only needs one number, , to say where it is. That's one degree of freedom.

A checker piece sliding around on a flat table needs two numbers: A drone flying freely through the air needs three, plus three more for which way it's facing — six total.
The set of every possible state a system could be in is called its configuration space. For a robot arm with three joints:
Every point in this abstract 3D "angle space" is one physical pose of the robot.
A robot arm and the abstract space of all its possible joint angles


Robot manipulators build up motion using two primary joint types:

  • Revolute joints: spin around an axis (like an elbow or shoulder)
  • Prismatic joints: slide linearly along an axis (like a telescope arm, elevator, or 3D printer axis)

Each joint contributes one degree of freedom to the system's configuration space, whether it measures an angle or a sliding distance .
Quiz // Question 1 OF 11
SCORE: 0

Q1. A bead slides along a single curved wire. How many degrees of freedom does it have?

Attempts registered: 0/ 2

Homogeneous coordinates

Turning and sliding in one single step

HOMOGENEOUS COORDINATESTRANSFORMATION MATRICES
Rotating is . Sliding is . A real move usually does both:
Wouldn't it be nice if both steps could happen with a single multiplication? We can do this with a trick: tack an extra "1" onto every point.
Now rotation and translation live inside one matrix:
and a single multiplication does everything:

Chaining coordinate frames

Connecting many small moves into one big one

TRANSFORMATION CHAINSHOMOGENEOUS COORDINATES
The real power shows up when several frames connect in a chain, like links of a necklace:
Instead of solving one giant, tangled geometry problem, we multiply a sequence of simple transformations — one per link.
A chain of coordinate frames from a robot's base to its camera

Forward kinematics

From joint variables to hand position

FORWARD KINEMATICSROBOTICSPRISMATIC JOINTS
Picture a simple two-link arm, like a shoulder and an elbow: = upper-arm length, = forearm length, = joint angles.
A two-link arm with shoulder angle θ₁ and elbow angle θ₂
The elbow lands at
The forearm points in direction , so the hand ends up at
This "angles → position" recipe is called forward kinematics. For longer robot arms, the same chain-of-frames trick from the last topic builds it up joint by joint:

For our two-link arm, we can think of each joint as creating a new coordinate frame. Frame 0 is attached to the robot's base, frame 1 is attached to the elbow, and frame 2 is attached to the hand. Each transformation tells us how to move from one frame to the next.

For example, the transformation from the base to the elbow consists of a rotation by followed by a translation of along the new link:
The transformation from the elbow to the hand similarly consists of a rotation by followed by a translation of :

We can then multiply the two transformations together:
This single transformation tells us where the hand is relative to the robot's base. When we multiply out the rotations and translations, the position part of the result is exactly

Notice what happened: instead of deriving the position of the hand directly with trigonometry, we built the robot one joint at a time. The first transformation takes us from the base to the elbow; the second takes us from the elbow to the hand. Multiplying them creates the complete transformation from the base to the hand.

This is the power of a chain of frames. For a two-link arm, the chain is short:
Each additional joint simply adds another transformation to the chain. The mathematics does not fundamentally change as the robot becomes more complicated; we just have more coordinate frames and more transformations to multiply together.

So far every joint has been revolute — it spins, but the link attached to it never changes length. Real robots also use prismatic joints, which don't rotate at all. They just slide in and out, like a drawer or a car antenna.
Robotics diagrams draw revolute joints as circles and prismatic joints as sliding rectangles
Here's the important part: the chain-of-transformations trick from the last topic doesn't change at all. You still multiply one transformation matrix per joint. You just pick a different kind of block depending on the joint:
Notice the revolute block has a fixed number baked in and a variable angle . The prismatic block flips that around: no rotation entries to vary at all, and the joint variable sits right where the fixed length used to be. There's no separate "prismatic link length" — the sliding distance is the joint variable.

Worked example — a revolute-then-prismatic ("R-P") arm: Suppose joint 1 is revolute (it aims the arm at angle ) and joint 2 is prismatic (it telescopes outward by a variable distance , sliding along the direction joint 1 already set). Multiplying the two blocks above:

Inverse kinematics

From where you want your hand to what angles to use

INVERSE KINEMATICSROBOTICS
Forward kinematics goes angles position. Inverse kinematics runs it backward: position angles.

Suppose we have a simple robotic arm with two rigid links. The first link has length , the second has length , and the hand needs to reach the target point . The inverse-kinematics problem is: what joint angles will put the hand there?

This is harder than forward kinematics because there may be multiple answers. The arm might reach the same point with its elbow up or elbow down. Some points can be reached in only one way, while points outside the arm's reach cannot be reached at all.

Step 1 — Find the elbow angle.
Imagine drawing a line from the shoulder joint directly to the target. Its length is
The two arm links and this new line form a triangle:

Now we can use the law of cosines. For any triangle with side lengths and angle opposite side ,

In our robot arm, the side opposite the elbow angle is , while the other two sides are and . Therefore,

Solving for the cosine gives

and substituting gives

The joint angle is often defined as the angle between the two links when they are folded in the robot's usual joint-coordinate convention. With that convention, , so . Therefore,

This is where the law of cosines leads directly to the inverse-kinematics equation: the desired position determines the third side of the triangle, and the three side lengths determine the elbow angle.

Why are there two solutions?
The same three side lengths can form a triangle in two mirror-image ways. The elbow can bend above or below the line from the shoulder to the target. These are the elbow-up and elbow-down configurations. They correspond to opposite signs for , even though they have the same value of .

Two valid elbow configurations reaching the same target point

Step 2 — Find the shoulder angle.
First, tells us the angle from the positive x-axis to the line connecting the shoulder to the target. We then subtract the angle contributed by the second link:

The second comes from the same triangle geometry. The second link contributes a vertical component and, together with the first link, a horizontal component . Thus, its angle is
and subtracting this from the target direction gives the shoulder angle.

Inverse kinematics

What if the target cannot be reached?
The law of cosines also tells us when a solution exists. For the inverse cosine to produce a real angle, its argument must lie between and . Geometrically, this is exactly the requirement that the three lengths can actually form a triangle.

For a two-link arm, the hand can reach points satisfying

The outer limit is the arm fully extended. The inner limit occurs when the links are folded as tightly as possible. A target outside this region has no inverse-kinematics solution.

Workspace

Where can the robot's hand actually go?

WORKSPACEINVERSE KINEMATICS
Not every point in space is reachable — try touching your elbow with your own hand without bending your wrist strangely!

For a two-link arm:
If both links are the same length , the arm can reach anywhere from the shoulder itself out to away.
The donut-shaped reachable zone of a two-link arm

Workspace

Drag the elbow to change θ₁, drag the hand to change θ₂, or use the sliders. The shaded donut is every point the hand can possibly reach. Click anywhere to drop a test point and see if it falls inside.

shoulder
hand (x, y)[0.77, 1.39]
|L₁ − L₂|0.25 m
L₁ + L₂1.75 m

Click anywhere to test whether that point is reachable.

Configuration space vs. task space

The robot's inner world vs. the outer world

CONFIGURATION SPACETASK SPACE
Configuration space is the robot's internal state — its joint angles:
Task space is the physical result we actually care about, like where the hand ends up:
Forward kinematics goes configuration space task space. Inverse kinematics tries to go the other way.

Here's the twist: elbow-up and elbow-down are two completely different configurations, but they can put the hand at the exact same task-space point.

The Jacobian

Turning joint speed into hand speed

JACOBIANVELOCITY
Forward kinematics tells us position: . But what if the joints are moving? How fast does the hand move?

The answer is the Jacobian matrix — a table of "how much does each output change when I wiggle each input a tiny bit":
For our two-link arm:
For small movements, this becomes a handy shortcut:

Singularities

When a robot loses a direction of motion

JACOBIANSINGULARITIES
Straighten your arm all the way out. Now try to move your hand slightly farther in the direction it's already pointing, using only small wiggles of your shoulder and elbow. It's surprisingly hard!

This is a kinematic singularity: a pose where the Jacobian loses the ability to move the hand in some direction. Mathematically, this happens when:
Near a singularity: some hand motions become impossible, and tiny hand movements can suddenly require huge, fast joint motions.
A fully extended two-link arm at a singular configuration
In a 2D plane, reaching a specific position requires at least 2 degrees of freedom. However, if your arm has 3 revolute joints, it can reach the exact same target position from many different approach angles. This is called a redundant manipulator: when a robot has more degrees of freedom than required by the task, it gains extra flexibility to navigate around obstacles or stay clear of kinematic singularities.

Other ways to describe orientation

Quaternions and screw motion

QUATERNIONSSCREW THEORYORIENTATION
Euler angles are easy to picture but suffer from gimbal lock. Engineers often use a different tool instead: the quaternion, four numbers that describe an orientation without ever getting stuck:
Four numbers for three degrees of freedom seems like too many — but one constraint ( ) uses up the extra one, leaving exactly three free directions. Quaternions are the go-to tool in drones, spacecraft, and video game engines.

There's an even deeper idea called screw motion: any rigid movement — no matter how complicated — can be described as a rotation around an axis plus a slide along that same axis, just like turning a screw into wood.
A screw motion: rotating around an axis while sliding along it

Putting it all together

The big picture

ROBOTICSKINEMATICSSUMMARY
Vectors describe positions and directions. Coordinate frames tell us who is doing the measuring. Rotation matrices and homogeneous transforms let us switch between frames. Configuration space describes every possible state a machine could be in. Forward kinematics maps joint angles to position; inverse kinematics runs that backward. The Jacobian connects joint speed to hand speed.

Capstone challenge: retrieve the sample

Put everything together on a Mars rover

CHALLENGEINVERSE KINEMATICSROBOTICS
You're designing a two-link arm for a Mars rover. The shoulder sits at , with
A rock sample sits at m.
A Mars rover's two-link arm reaching toward a rock sample
1. Reachable? Calculate and check it against the workspace inequality.

2. Find θ₂. Use the law-of-cosines formula. Why might there be two valid answers?

3. Find θ₁. Use the formula.

4. Check your work. Plug your angles back into the forward-kinematics equations. Do you land near ?

5. Configuration space check. Sketch elbow-up and elbow-down. How can two different configurations give the same hand position?

6. Add an obstacle. A rock blocks the elbow-up pose. Does the inverse-kinematics math still work? Is it still a usable robot motion?
The Mars Curiosity rover (source:"NASA/JPL-Caltech/MSSS")

Exit questions

REVIEWDISCUSSION
1. Why is "the ball is at (3,4)" incomplete without naming a coordinate frame?

2. Why does the order of 3D rotations matter?

3. What's the difference between configuration space and the physical space around you?

4. Why are homogeneous coordinates useful?

5. What's the difference between forward and inverse kinematics?

6. Why can inverse kinematics have more than one answer?

7. In plain English, what does the Jacobian tell us?

8. What happens to a robot near a singularity?

9. Why might an engineer choose a quaternion over Euler angles?

10. What's the one big idea that connects coordinate frames, forward kinematics, inverse kinematics, and the Jacobian?
END OF SESSION 04