GraphMath

Linear transformations in 3D

Scaling and shear matrices acting on the unit cube

How do simple 3×3 matrices deform three-dimensional space?

This chapter visualizes 3D linear transformations through the unit cube. Scaling changes coordinate lengths independently, while shear keeps some coordinates fixed and adds controlled multiples of other coordinates. The matrices are shown together with before-and-after cube views so the algebra and geometry can be read side by side.

Key ideas

In 3D, a matrix can be read as a rule for changing the three coordinates of every point.

  • Diagonal scaling sends x₁, x₂ and x₃ to independently scaled coordinates
  • An elementary shear changes one coordinate by adding a multiple of another coordinate
  • Shearing xᵢ by xⱼ keeps the other coordinates fixed and tilts the unit cube in the corresponding direction
  • A coordinate can also be sheared by two other coordinates, for example x₃′ = x₃ + s₁x₁ + s₂x₂
  • The before-and-after cube views show the same transformation from several camera directions

The goal is to make the entries of a 3×3 transformation matrix visible as concrete changes in a 3D shape.

What does a 3D shear matrix do?

A 3D shear keeps most coordinates unchanged and replaces one coordinate by that coordinate plus a multiple of another. For example, shearing x₁ by x₂ sends x₁′ = x₁ + sx₂ while x₂ and x₃ stay fixed. Geometrically, the cube tilts, but the origin remains fixed and parallel lines remain parallel.

Related chapters

Chapter contents

The PDF is a single document. The page links below are best-effort: most browsers support them, but some viewers may ignore the page hint.

Topic Pages
Scaling 1–2
Elementary shear of x₁ by x₂ 2–3
Elementary shear of x₁ by x₃ 3–4
Elementary shear of x₂ by x₁ 4–5
Elementary shear of x₂ by x₃ 6–7
Elementary shear of x₃ by x₁ 7–8
Elementary shear of x₃ by x₂ 8–9
Shear x₃ by x₁ and x₂ 10–11
Shear x₂ by x₁ and x₃ 11–12
Shear x₁ by x₂ and x₃ 12–13

Why does shear preserve straightness but change shape?

A shear is still linear, so it sends lines to lines and keeps the origin fixed. But it mixes coordinates, so points farther in one direction are shifted more in another direction. That coordinate mixing turns the cube into a tilted parallelepiped.

Was this chapter helpful?

Quick feedback helps us improve the site.