# Worksheet: Mathematical foundations of movement

*Tactiverge Academy · Robotics Foundations, module 4 · https://tactiverge.win/academy/robotics-foundations/#mathematical-foundations-of-movement*

Name: ______________________    Date: ____________

## Learning objectives

Tick each one when you can do it without looking at your notes.

- [ ] Convert between degrees and radians and use sine and cosine to find the components of a vector.
- [ ] Describe positions in a coordinate frame and add vectors tip to tail.
- [ ] Compute the forward kinematics of a two-link planar arm.
- [ ] Explain why inverse kinematics can have zero, one or two solutions, and solve a simple case.

## Lesson 1: Coordinates, angles and vectors

The language of position and direction: coordinate frames, radians, sine and cosine, and adding vectors tip to tail.

Read online: https://tactiverge.win/academy/robotics-foundations/mathematical-foundations-of-movement/coordinates-angles-vectors/

### Check your understanding

1. How many radians are in a half turn (180°)?
   A) 1
   B) π
   C) π/2
   D) 2π

2. A link of length 4 points at 90° (straight up). Where is its tip?
   A) (4, 0)
   B) (2.83, 2.83)
   C) (0, 4)
   D) (0, 0)

3. Why does robotics code prefer atan2(y, x) over a plain inverse tangent of y/x?
   A) atan2 runs faster
   B) atan2 works in degrees only
   C) atan2 uses the signs of x and y to return the correct angle in all four quarters of the plane
   D) A plain inverse tangent cannot be computed by a computer

4. You move along the vector (2, 5) and then along (3, −1). What is your total displacement?
   A) (6, −5)
   B) (−1, 6)
   C) (5, 6)
   D) (5, 4)

### My notes

______________________________________________

______________________________________________

## Lesson 2: Forward and inverse kinematics of a two-link arm

Work out where a simple robot arm's hand will be from its joint angles, and then reverse the problem to find joint angles that reach a target.

Read online: https://tactiverge.win/academy/robotics-foundations/mathematical-foundations-of-movement/two-link-arm-kinematics/

#### Project: Paper and calculator project: map a workspace

Choose your own link lengths for a two-link arm (for example L₁ = 6 and L₂ = 4).

1. On squared paper, draw the inner and outer edges of the workspace.
2. Pick five target points: two well inside, one on the outer edge, one inside the inner hole and one outside the reach.
3. For each, compute cos θ₂ and decide how many solutions exist.
4. For one target with two solutions, compute both pairs of angles and check them with forward kinematics. Sketch both arm shapes.

A calculator in degree mode is enough. If you know some Python, you may write a short program instead — remember that Python's `math` functions use radians.

**Deliverables**

- A scale drawing of the workspace with your five targets marked
- A table of r², cos θ₂ and the number of solutions for each target
- Both joint-angle solutions for one target, verified by forward kinematics

### Check your understanding

1. In a two-link arm with θ₂ measured relative to link 1, which angle gives the absolute direction of link 2?
   A) θ₁ + θ₂
   B) θ₂
   C) θ₁ − θ₂
   D) θ₁ · θ₂

2. With L₁ = 10 and L₂ = 8, both joints at 0°, where is the hand?
   A) (0, 18)
   B) (18, 0)
   C) (10, 8)
   D) (2, 0)

3. For a target, the inverse kinematics formula gives cos θ₂ = 1.4. What does this mean?
   A) There are two solutions
   B) The target is out of reach — there is no solution
   C) The arm must be fully folded
   D) θ₂ = 1.4 radians

4. Why is it good practice to run forward kinematics on an inverse kinematics answer?
   A) It makes the robot move faster
   B) Forward kinematics chooses between elbow-up and elbow-down
   C) It confirms that the computed joint angles really place the hand at the target, catching sign and rounding mistakes
   D) It is required by law

5. Which statement about inverse kinematics for a two-link planar arm is true?
   A) There is always exactly one solution
   B) It never has a solution
   C) It only works when θ₁ = 0
   D) A reachable target usually has two solutions: elbow up and elbow down

### My notes

______________________________________________

______________________________________________

## Lesson 3: Rotations in 2D

Describe turning with a rotation matrix, compose rotations by multiplying matrices, and learn the crucial difference between rotating a point and rotating a frame.

Read online: https://tactiverge.win/academy/robotics-foundations/mathematical-foundations-of-movement/rotations-in-2d/

#### Project: Paper or Python project: rotate a shape

Draw a small triangle on squared paper with corners at (1, 0), (3, 0) and (3, 2).

1. Rotate each corner by 90° using the rotation rule, and draw the new triangle.
2. Rotate the original by 45°. Use cos 45° = sin 45° ≈ 0.707.
3. Check that each side of the triangle has the same length before and after.
4. Now imagine a robot at the origin facing 90°. Compute where the *original* triangle's corners appear in the robot's own frame, and explain why the answer differs from step 1.

You may use the Python `rotate` function from the lesson to check your hand calculations.

**Deliverables**

- A drawing of the original, 90°-rotated and 45°-rotated triangles
- Side lengths before and after each rotation
- The corners in the robot's frame, with a one-sentence explanation of the sign change

### Check your understanding

1. Rotating the point (0, 3) by 90° anticlockwise about the origin gives:
   A) (3, 0)
   B) (0, −3)
   C) (−3, 0)
   D) (3, 3)

2. What do the two columns of a 2D rotation matrix represent?
   A) Where the x and y axis directions end up after the rotation
   B) The sine and cosine tables
   C) The original point and the rotated point
   D) The x and y coordinates of the origin

3. Which statement about R(20°) · R(50°) in 2D is correct?
   A) It equals R(1000°)
   B) It equals R(30°)
   C) It depends on which matrix is applied first
   D) It equals R(70°)

4. How can you undo a 2D rotation matrix R(θ) most simply?
   A) Multiply it by 2
   B) Use its transpose, which equals R(−θ)
   C) Divide every entry by θ
   D) Rotations cannot be undone

5. A robot at the origin turns to face 90° anticlockwise. A fixed object is at world (5, 0). Where is it in the robot's own frame (x forward, y left)?
   A) (0, 5)
   B) (0, −5)
   C) (5, 0)
   D) (−5, 0)

### My notes

______________________________________________

______________________________________________

## Lesson 4: Coordinate frames and homogeneous transforms

Combine rotation and translation into one 3 × 3 matrix, chain transforms from world to base to tool, invert them, and rebuild the two-link arm as a chain of frames.

Read online: https://tactiverge.win/academy/robotics-foundations/mathematical-foundations-of-movement/frames-and-transforms/

### Check your understanding

1. Frame B is rotated 0° relative to frame A and its origin is at (4, −1) in A. A point is at (2, 3) in B. Where is it in A?
   A) (6, 2)
   B) (2, 3)
   C) (−2, 4)
   D) (8, −3)

2. Why is a third coordinate equal to 1 added to 2D points in homogeneous transforms?
   A) To store the point's colour
   B) To make the points three-dimensional
   C) So that the translation column is multiplied by 1 and added, letting rotation and translation be done by a single matrix multiplication
   D) Because rotation matrices need three rows

3. Which chain correctly gives the tool frame in world coordinates?
   A) T_world_tool = T_tool_base · T_world_base
   B) T_world_tool = T_base_world · T_tool_base
   C) T_world_tool = T_base_tool · T_world_base
   D) T_world_tool = T_world_base · T_base_tool

4. Starting at the origin facing along x, an ant does Trans(5) and then Rot(90°). Where is it?
   A) (0, 5)
   B) (5, 0)
   C) (5, 5)
   D) (−5, 0)

5. A robot base is at world (10, 0) with no rotation. A camera sees an object at world (14, 3). Where is the object in the base frame?
   A) (24, 3)
   B) (4, 3)
   C) (−4, −3)
   D) (14, 3)

### My notes

______________________________________________

______________________________________________

## Lesson 5: Inverse kinematics and the workspace

Use the two-link inverse kinematics solution like an engineer: map the workspace, choose between multiple solutions, handle unreachable targets and recognise singularities.

Read online: https://tactiverge.win/academy/robotics-foundations/mathematical-foundations-of-movement/inverse-kinematics-and-workspace/

#### Project: Explorer and Python project: a reachability report

Using the explorer's default arm (L₁ = 20 cm, L₂ = 15 cm):

1. Choose eight targets: three well inside the workspace, two within 1 cm of the outer edge, one within 1 cm of the inner edge, and two unreachable.
2. For each, record both solutions from the explorer, or from the Python solver, and verify one of them with forward kinematics.
3. Assume the arm currently sits at θ₁ = 0°, θ₂ = 90°. For each reachable target, say which solution the "least movement" rule picks.
4. Now impose an elbow limit of 0° to +150°. Which of your targets become unreachable, and why?

No hardware is needed.

**Deliverables**

- A list of eight targets with r, cos θ₂ and both solutions (or 'unreachable')
- One forward-kinematics check per reachable target
- The chosen solution for each target and the effect of the elbow limit

### Check your understanding

1. An arm has L₁ = 20 cm and L₂ = 15 cm. Which target has no inverse kinematics solution?
   A) (20, 10)
   B) (0, 30)
   C) (4, 2)
   D) (−25, 0)

2. Two valid solutions reach a target. The arm is currently close to the elbow-up solution. Which is usually preferred, assuming both respect joint limits and avoid collisions?
   A) Elbow up, because it needs less joint movement from the current pose
   B) Elbow down, because it is always safer
   C) Whichever has the larger θ₁
   D) Neither; the robot should refuse the target

3. With the elbow limited to 0°…+150° on a 20 cm / 15 cm arm, the inner unreachable radius is about:
   A) 5 cm
   B) 35 cm
   C) 0 cm
   D) 10.3 cm

4. What happens to the two IK solutions as a target approaches the outer edge of the workspace?
   A) They move further apart
   B) They merge into one solution with the arm fully stretched, a singular configuration
   C) A third solution appears
   D) They become negative

5. Why do targets near a singularity cause problems for a robot controller?
   A) The target becomes invisible to the camera
   B) Forward kinematics stops working
   C) Small changes in the target require large changes in joint angles, which means very fast joint motion
   D) The gripper opens automatically

### My notes

______________________________________________

______________________________________________

## Lesson 6: Velocity kinematics and the Jacobian

How joint speeds become hand speed: build the planar two-link Jacobian from the idea of rotating points, check it numerically, and see why singular configurations make the hand stuck.

Read online: https://tactiverge.win/academy/robotics-foundations/mathematical-foundations-of-movement/velocity-and-the-jacobian/

### Check your understanding

1. A 12 cm link rotates at 0.25 rad/s. How fast does its tip move?
   A) 48 cm/s
   B) 3 cm/s
   C) 0.25 cm/s
   D) 12.25 cm/s

2. What does the first column of the two-link Jacobian represent?
   A) The hand's position
   B) The elbow's position
   C) The joint angles
   D) The hand velocity produced by turning only the shoulder at 1 rad/s

3. For a two-link arm with L₁ = 10 cm and L₂ = 8 cm at θ₂ = 30°, what is the Jacobian's determinant?
   A) 80
   B) 69.3
   C) 40
   D) 0

4. Why can a fully straight two-link arm not move its hand directly towards the base?
   A) Both Jacobian columns point the same way, perpendicular to the arm, so no combination of joint speeds produces motion along the arm
   B) The motors are switched off at full reach
   C) The determinant is very large
   D) The hand is outside the workspace

5. A shoulder turns at +0.4 rad/s while the elbow turns at −0.4 rad/s. What is true of the forearm?
   A) It rotates twice as fast as the shoulder
   B) Its absolute direction θ₁ + θ₂ stays constant, so the hand moves exactly like the elbow
   C) It stops the whole arm moving
   D) It moves the hand along the arm's line

### My notes

______________________________________________

______________________________________________

---

## Answer key (for self-checking after you try)

**Lesson 1: Coordinates, angles and vectors**

1. B — A full turn is 2π radians, so half a turn is π radians.
2. C — cos 90° = 0 and sin 90° = 1, so the tip is at (4 · 0, 4 · 1) = (0, 4).
3. C — y/x loses information about signs: (1, 1) and (−1, −1) give the same ratio. atan2 keeps both, so it can tell those directions apart.
4. D — Add components: x = 2 + 3 = 5, y = 5 + (−1) = 4.

**Lesson 2: Forward and inverse kinematics of a two-link arm**

1. A — Link 2 inherits link 1's direction and then turns by θ₂ more, so its world direction is θ₁ + θ₂.
2. B — Both links point along x, so x = 10 + 8 = 18 and y = 0.
3. B — No angle has a cosine greater than 1. Geometrically, the target is farther than L₁ + L₂ from the base.
4. C — Forward kinematics is simple and reliable, so it is an independent check on the harder inverse calculation.
5. D — Inside the workspace (but not on its edges), two different elbow angles, +θ₂ and −θ₂, reach the same point.

**Lesson 3: Rotations in 2D**

1. C — x' = 0 · 0 − 3 · 1 = −3 and y' = 0 · 1 + 3 · 0 = 0. A point straight up swings round to the left.
2. A — The first column is the image of (1, 0) and the second is the image of (0, 1). Any rotated point is a mix of those two columns.
3. D — In 2D, rotations about the origin combine by adding their angles, and the order does not matter. In 3D the order does matter.
4. B — Swapping rows and columns turns R(θ) into R(−θ), which rotates back. For rotation matrices the transpose is the inverse.
5. B — Expressing a fixed point in a turned frame uses R(−90°): (5 · 0 + 0 · 1, −5 · 1 + 0 · 0) = (0, −5). The object is now 5 m to the robot's right.

**Lesson 4: Coordinate frames and homogeneous transforms**

1. A — With no rotation, p_A = p_B + t = (2 + 4, 3 + (−1)) = (6, 2).
2. C — The 1 picks up tx and ty from the right-hand column. That turns rotate-then-shift into one multiplication, so chains of frames become chains of products.
3. D — The inner names must match (base next to base), leaving world and tool on the outside.
4. B — It walks 5 along x to (5, 0), then turns on the spot. Turning first and then walking would have put it at (0, 5); order matters.
5. B — Inverting the transform means unshifting first: (14 − 10, 3 − 0) = (4, 3). With no rotation, there is nothing to unrotate.

**Lesson 5: Inverse kinematics and the workspace**

1. C — (4, 2) is √20 ≈ 4.47 cm from the base, inside the 5 cm hole (|L₁ − L₂|). The others lie between 5 and 35 cm.
2. A — The least-movement rule keeps motions short and smooth and avoids the elbow flipping through a large swing.
3. D — At the maximum fold of 150°, r = √(400 + 225 + 600 · cos 150°) ≈ √105.4 ≈ 10.27 cm. The arm cannot fold tighter.
4. B — At r = L₁ + L₂, cos θ₂ = 1 and both solutions become θ₂ = 0. That straight-arm pose is a singularity.
5. C — Near the edge, a 0.9 cm target move changed θ₂ by about 19°. Following a path through that region demands large joint speeds.

**Lesson 6: Velocity kinematics and the Jacobian**

1. B — v = ω × L = 0.25 × 12 = 3 cm/s, in a direction perpendicular to the link.
2. D — Each column is the effect of one joint alone. Any combination of joint speeds produces a weighted sum of the columns.
3. C — det = L₁ · L₂ · sin θ₂ = 10 × 8 × 0.5 = 40. It does not depend on θ₁.
4. A — At θ₂ = 0, both joints move the hand sideways only. The determinant L₁ · L₂ · sin θ₂ is zero, signalling a singularity.
5. B — The two rotations cancel for the forearm's world direction. It translates without turning, so the hand has the elbow's velocity, 0.4 × L₁.

---

This work is licensed under the Creative Commons Attribution 4.0 International licence (CC BY 4.0): https://creativecommons.org/licenses/by/4.0/. Attribute as: Tactiverge Academy, https://tactiverge.win.
