7.C] Consider an image point [2, 2]. Perform the following operations and show the results:

a) Translate the image right by 3 units.

b) Scale the image in both x-axis and y-axis by 3 units.

c) Rotate the image in x-axis by 45°.

Answer:

### Matrix Operations on Point [2, 2]

#### 1. Initial Point:

The given point is **[2, 2]**, represented as a column vector:

⎛ 2 ⎞ ⎜ 2 ⎟ ⎝ ⎠

#### 2. Translation by 3 Units to the Right:

**Translation Matrix:**

⎛ 1 0 3 ⎞ ⎜ 0 1 0 ⎟ ⎝ 0 0 1 ⎠

**Point in Homogeneous Coordinates:**

⎛ 2 ⎞ ⎜ 2 ⎟ ⎝ 1 ⎠

**Translated Point:**

⎛ 1 0 3 ⎞ ⎛ 2 ⎞ ⎛ 5 ⎞ ⎜ 0 1 0 ⎟ × ⎜ 2 ⎟ = ⎜ 2 ⎟ ⎝ 0 0 1 ⎠ ⎝ 1 ⎠ ⎝ 1 ⎠

**Resulting Point:** [5, 2]

#### 3. Scaling by 3 Units in x and y Directions:

**Scaling Matrix:**

⎛ 3 0 0 ⎞ ⎜ 0 3 0 ⎟ ⎝ 0 0 1 ⎠

**Point in Homogeneous Coordinates:**

⎛ 2 ⎞ ⎜ 2 ⎟ ⎝ 1 ⎠

**Scaled Point:**

⎛ 3 0 0 ⎞ ⎛ 2 ⎞ ⎛ 6 ⎞ ⎜ 0 3 0 ⎟ × ⎜ 2 ⎟ = ⎜ 6 ⎟ ⎝ 0 0 1 ⎠ ⎝ 1 ⎠ ⎝ 1 ⎠

**Resulting Point:** [6, 6]

#### 4. Rotation by 45° Around the Origin:

##### Why \(\frac{1}{\sqrt{2}}\) is used:

The trigonometric values for 45° are:

- \(\cos(45^\circ) = \frac{\sqrt{2}}{2}\)
- \(\sin(45^\circ) = \frac{\sqrt{2}}{2}\)

To simplify calculations, these values are often expressed as \(\frac{1}{\sqrt{2}}\) because \(\frac{\sqrt{2}}{2}\) is mathematically equivalent to \(\frac{1}{\sqrt{2}}\).

**Rotation Matrix:**

⎛ 1/√2 -1/√2 0 ⎞ ⎜ 1/√2 1/√2 0 ⎟ ⎝ 0 0 1 ⎠

**Point in Homogeneous Coordinates:**

⎛ 2 ⎞ ⎜ 2 ⎟ ⎝ 1 ⎠

**Rotated Point:**

⎛ 1/√2 -1/√2 0 ⎞ ⎛ 2 ⎞ ⎛ 0 ⎞ ⎜ 1/√2 1/√2 0 ⎟ × ⎜ 2 ⎟ = ⎜ 2√2 ⎟ ⎝ 0 0 1 ⎠ ⎝ 1 ⎠ ⎝ 1 ⎠

Simplifying:

⎛ 0 ⎞ ⎜ 2.83 ⎟ ⎝ 1 ⎠

**Resulting Point:** [0, 2.83]