geocssLAB
← Back to the labPrintable worksheetShare to Google Classroom

GeoCSS · LAB 04 · 8.G.A.1 · 8.G.A.3 · 8.G.B.8

Translations and the Distance Formula Lab: Answer Key

This key is public so any teacher can use it without an account. Students can find it too; the worksheet asks for reasoning, which a copied number does not supply.

Open the lab at geocss.com/labs/translations-distance-formula/. In the lab, the square is 60 px by 60 px and each grid square is 20 px. translate(x, y) moves it x px right and y px down.

1 · Predict (before you touch the lab)

  1. Where will translate(60px, 80px) move the square?

    Answer: 60 px right and 80 px down (on screen, positive y points down).

  2. How far will the square’s center move in a straight line?

    Answer: 100 px, because √(60² + 80²) = 100.

  3. Will the square’s area change after the move?

    Answer: No. A translation is a rigid motion; the area stays 3,600 px².

2 · Test in the lab

Set each movement in the lab. Record the straight-line distance (to two decimal places) and sketch the right triangle.

Movement (x, y) pxLeg lengthsDistance √(x² + y²) (px)
(30, 40)30 and 4050
(−60, 80)60 and 80100
(80, −60)80 and 60100
(40, 40)40 and 4056.57

3 · Explain

  1. Explain how √(x² + y²) is the Pythagorean theorem.

    Answer: The horizontal move and vertical move are the two legs of a right triangle. The straight-line move is the hypotenuse, so c² = x² + y² and c = √(x² + y²).

  2. Why do (−60, 80) and (80, −60) give the same distance?

    Answer: Both have legs of 60 and 80. Squaring removes the sign, and the order of the legs doesn’t matter: √(3,600 + 6,400) = 100.

  3. Write the CSS that moves the square 50 px left and 20 px up.

    Answer: transform: translate(-50px, -20px);

4 · Exit ticket

A point is translated by (−30, −40). How far did it move? Show your work.

Answer: √((−30)² + (−40)²) = √(900 + 1,600) = √2,500 = 50 units.

Lab challenges

  1. The shortest way from A to B. Move 60 px right and 80 px down. What is the straight-line distance between the starting and ending centers?

    Answer: By the Pythagorean theorem, √(60² + 80²) = √10,000 = 100 px. The translation preserves the square’s size.

  2. Left and down. Set translate(-30px, 40px). How far does the square’s center move in a straight line, in px?

    Answer: The legs are 30 and 40 (direction does not change length): √(30² + 40²) = √2,500 = 50 px.

  3. Up is negative. On a math-class graph, moving up 40 means y increases by 40. What y value goes in CSS translate() to move the square up 40 px?

    Answer: Screen y points down, so moving up 40 px is translate(0px, -40px). The y value is −40.