---
title: "3D shearing and matrix"
subject: "Computer Graphics"
chapter: 4
key: "semester_5/computer_graphics:what-is-3d-shearing"
source: https://www.bctengineer.com/q/semester_5/computer_graphics/what-is-3d-shearing
site: BCT Engineering
---

# 3D shearing and matrix

Computer Graphics · Chapter 4: Three-Dimensional Graphics

- Asked in: 2072 Chaitra, 2 marks; 2078 Bhadra, 3 marks; 2068 Bhadra (old course), 10 marks (asked 3 times)
- Video: [3D Shearing | CG | Computer Graphics | Lec-30 | Bhanu priya](https://www.youtube.com/watch?v=EtO7TZQfhkc) — Education 4u
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_5/computer_graphics/what-is-3d-shearing
- Whole chapter: https://www.bctengineer.com/md/semester_5/computer_graphics/chapter-4

## Question

What is 3D shearing? Write its matrix representation (how do you perform shearing operations in 3-D in different directions? discuss with necessary shear matrix).

## Short answer

3D shearing slides layers of an object parallel to a fixed coordinate axis; one coordinate is unchanged while the other two shift proportionally. The shear along x-axis uses matrix with x'=x, y'=y+sh_y·x, z'=z+sh_z·x, with similar forms for y and z.

## Answer

**Shearing** is a transformation that distorts the shape of an object by sliding its layers over each other, as if the object were pushed sideways. One coordinate is kept fixed and the other two are changed in proportion to it. It is an affine transformation: straight lines stay straight, but angles change.

In 3D there are three kinds of shear, one for each axis whose coordinate is held fixed.

**1. Shear along the x-axis (x fixed)**

x' = x, y' = y + sh_y·x, z' = z + sh_z·x

```text
| 1    0 0 0 |
| sh_y 1 0 0 |
| sh_z 0 1 0 |
| 0    0 0 1 |
```

**2. Shear along the y-axis (y fixed)**

x' = x + sh_x·y, y' = y, z' = z + sh_z·y

```text
| 1 sh_x 0 0 |
| 0 1    0 0 |
| 0 sh_z 1 0 |
| 0 0    0 1 |
```

**3. Shear along the z-axis (z fixed)**

x' = x + sh_x·z, y' = y + sh_y·z, z' = z

```text
| 1 0 sh_x 0 |
| 0 1 sh_y 0 |
| 0 0 1    0 |
| 0 0 0    1 |
```

The shear constants (sh_x, sh_y, sh_z) tell how much each coordinate is displaced per unit of the fixed coordinate. The general shear matrix is a combination of the three. Points on the fixed plane (for example x = 0 for x-shear) do not move.

Example: a unit cube sheared with the z-shear and sh_x = 1 becomes a slanted block whose top face (z = 1) moves one unit in x.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. In a 3D shear along the x-axis (x held fixed), which coordinates change?
   A. y and z, each by an amount proportional to x
   B. x and y, in proportion to z
   C. Only x, in proportion to y and z
   D. All three coordinates are scaled by the same factor
   Answer: A. With x fixed, y' = y + sh_y*x and z' = z + sh_z*x, so the other two coordinates slide in proportion to x. (Key point: Shear x fixed)

2. For the shear with z fixed, where do the shear constants sh_x and sh_y appear in the 4x4 matrix?
   A. In the first row, columns 2 and 3
   B. In the fourth column
   C. In the third column, in rows 1 and 2
   D. In the diagonal positions
   Answer: C. Since x' = x + sh_x*z and y' = y + sh_y*z, sh_x and sh_y sit in the z column of rows 1 and 2. (Key point: Z-shear matrix)

3. What happens to points lying on the fixed plane (for example x = 0 for an x-shear)?
   A. They move by sh_y and sh_z
   B. They do not move
   C. They are reflected across the plane
   D. They are scaled towards the origin
   Answer: B. The displacement is proportional to the fixed coordinate, which is 0 on that plane, so those points stay. (Key point: Fixed plane)

4. Which statement about shearing is correct?
   A. It preserves both lengths and angles
   B. It keeps angles but changes straightness of lines
   C. It only translates the object without distorting it
   D. It is affine: straight lines stay straight but angles change
   Answer: D. Shear slides layers over each other, distorting shape and angles while straight lines remain straight. (Key point: Shear properties)

## Related in Computer Graphics

- [Boundary representation of 3D objects](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Aboundary-representation-technique) — Computer Graphics, chapter 6, asked 4×
- [3D world to viewing coordinate matrix](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Aworld-to-viewing-3d-matrix) — Computer Graphics, chapter 4, asked 2×
- [Shear unit cube w.r.t. yz plane](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Acube-shear-yz-constant-2) — Computer Graphics, chapter 4, asked 4×
- [Shear cube w.r.t. ZX plane, constant 3](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Acube-shear-zx-constant-3) — Computer Graphics, chapter 4, asked 4×
- [3D rotation about axis (1,2,3)-(10,20,30)](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Arotate-3d-axis-1-2-3) — Computer Graphics, chapter 4
- [3D window to viewport transformation](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Awindow-viewport-3d-matrix) — Computer Graphics, chapter 4

## Related in other subjects

- [Sheet metal cutting and forming operations](https://www.bctengineer.com/question.md?key=semester_2%2Fworkshop_technology%3Asheet-metal-operations-explained) — Workshop Technology, chapter 8
- [Why state representation; controllable canonical form](https://www.bctengineer.com/question.md?key=semester_6%2Fdigital_control_system%3Astate-representation-why-ccf) — Digital Control System, chapter 5, asked 2×
- [Russell: wisdom more necessary with knowledge](https://www.bctengineer.com/question.md?key=semester_5%2Fcommunication_english%3Arussell-wisdom-more-necessary) — Communication English, chapter 2, asked 2×
- [Data structure types and operations](https://www.bctengineer.com/question.md?key=semester_4%2Fdata_structure_and_algorithm%3Adata-structure-types-operations) — Data Structure and Algorithm, chapter 1
