# Nakafa Learning Content

> For AI agents: use [llms.txt](https://nakafa.com/llms.txt) for the site index. Markdown versions are available by appending `.md` to content URLs or sending `Accept: text/markdown`.

URL: https://nakafa.com/en/subjects/mathematics/function-transformation/rotation
Source: https://raw.githubusercontent.com/nakafaai/nakafa.com/refs/heads/main/packages/contents/material/lesson/mathematics/function-transformation/rotation/en.mdx

Learn function rotation around fixed points with worked examples. Learn rotation formulas, angles, and transformations for various function types.

---

## Understanding Function Rotation

Rotation is a geometric transformation that rotates an object around a specific center point with a determined rotation angle. In the context of functions, rotation changes the position of the function graph by rotating every point on the graph.

Imagine rotating a wheel. Every point on the wheel will move following a circle with the rotation center as its center. Similarly with function graphs, every point will rotate following the same pattern.

## Rotation Formula Around Center Point

For rotation around center point $$(a, b)$$ with angle $$\theta$$, the transformation formula is:

Visible text: For rotation around center point with angle , the transformation formula is:

Component: MathContainer
Children:

```math
x' = (x - a) \cos \theta - (y - b) \sin \theta + a
```

```math
y' = (x - a) \sin \theta + (y - b) \cos \theta + b
```

Where:

- $$(x, y)$$ is the original point coordinate
- <InlineMath math="(x', y')" /> is the rotated point coordinate
- $$(a, b)$$ is the rotation center point
- $$\theta$$ is the rotation angle (positive for counterclockwise direction)

Visible text: - is the original point coordinate
- <InlineMath math="(x', y')" /> is the rotated point coordinate
- is the rotation center point
- is the rotation angle (positive for counterclockwise direction)

## Special Rotation Around Origin

When rotation is performed around the origin $$(0, 0)$$, the formula becomes simpler:

Visible text: When rotation is performed around the origin , the formula becomes simpler:

1. $$90^\circ$$ Rotation

    
   
   ```math
   (x, y) \rightarrow (-y, x)
   ```

2. $$180^\circ$$ Rotation

    
   
   ```math
   (x, y) \rightarrow (-x, -y)
   ```

3. $$270^\circ$$ Rotation

    
   
   ```math
   (x, y) \rightarrow (y, -x)
   ```

Visible text: 1. Rotation

 
 

2. Rotation

 
 

3. Rotation

## Visualization of Quadratic Function Rotation

Let's see how rotation affects the quadratic function $$y = x^2$$:

Visible text: Let's see how rotation affects the quadratic function :

Component: LineEquation
Props:
- title: Rotation of Function $$y = x^2$$ Around Origin
  Visible text: Rotation of Function Around Origin
- description: Comparison of original function with $$90^\circ$$ counterclockwise rotation result.
  Visible text: Comparison of original function with counterclockwise rotation result.
- data: [
{
points: Array.from({ length: 21 }, (_, i) => {
const x = (i - 10) * 0.5;
const y = x * x * 0.25;
return { x, y, z: 0 };
}),
color: getColor("PURPLE"),
showPoints: false,
labels: [
{
text: "y = x²",
at: 15,
offset: [0.5, 0.5, 0],
},
],
},
{
points: Array.from({ length: 21 }, (_, i) => {
const x = (i - 10) * 0.5;
const y = x * x * 0.25;
// 90° rotation around origin: (x,y) → (-y,x)
const xRotated = -y;
const yRotated = x;
return { x: xRotated, y: yRotated, z: 0 };
}),
color: getColor("ORANGE"),
showPoints: false,
labels: [
{
text: "90° Rotation Result",
at: 5,
offset: [-1, 0.5, 0],
},
],
},
]

## Properties of Function Rotation

Rotation has several important properties:

- **Preserves Shape**: Rotation does not change the basic shape of the graph, only changes its orientation
- **Preserves Distance**: The distance between two points on the graph remains the same after rotation
- **Rotation Composition**: Consecutive rotations can be combined by adding their angles

## Application of Rotation to Various Functions

### Linear Function Rotation

For linear function $$y = mx + c$$, rotation will change the slope and position of the line.

Visible text: For linear function , rotation will change the slope and position of the line.

Component: LineEquation
Props:
- title: Rotation of Linear Function $$y = 2x + 1$$
  Visible text: Rotation of Linear Function
- description: $$45^\circ$$ rotation around origin.
  Visible text: rotation around origin.
- data: [
{
points: Array.from({ length: 11 }, (_, i) => {
const x = (i - 5);
const y = 2 * x + 1;
return { x, y, z: 0 };
}),
color: getColor("TEAL"),
showPoints: false,
labels: [
{
text: "y = 2x + 1",
at: 6,
offset: [1, 0.5, 0],
},
],
},
{
points: Array.from({ length: 11 }, (_, i) => {
const x = (i - 5);
const y = 2 * x + 1;
// 45° rotation around origin
const cos45 = Math.cos(Math.PI / 4);
const sin45 = Math.sin(Math.PI / 4);
const xRotated = x * cos45 - y * sin45;
const yRotated = x * sin45 + y * cos45;
return { x: xRotated, y: yRotated, z: 0 };
}),
color: getColor("VIOLET"),
showPoints: false,
labels: [
{
text: "45° Rotation",
at: 6,
offset: [-0.5, 0.5, 0],
},
],
},
]

### Exponential Function Rotation

Rotation can also be applied to exponential functions with interesting results.

Component: LineEquation
Props:
- title: Rotation of Function $$y = 2^x$$
  Visible text: Rotation of Function
- description: $$90^\circ$$ counterclockwise rotation.
  Visible text: counterclockwise rotation.
- cameraPosition: [8, 6, 8]
- data: [
{
points: Array.from({ length: 15 }, (_, i) => {
const x = (i - 7) * 0.5;
const y = Math.pow(2, x * 0.5);
return { x, y, z: 0 };
}),
color: getColor("EMERALD"),
showPoints: false,
labels: [
{
text: "y = 2^x",
at: 12,
offset: [0.5, 0.5, 0],
},
],
},
{
points: Array.from({ length: 15 }, (_, i) => {
const x = (i - 7) * 0.5;
const y = Math.pow(2, x * 0.5);
// 90° rotation around origin: (x,y) → (-y,x)
const xRotated = -y;
const yRotated = x;
return { x: xRotated, y: yRotated, z: 0 };
}),
color: getColor("AMBER"),
showPoints: false,
labels: [
{
text: "90° Rotation",
at: 3,
offset: [-0.5, 0.5, 0],
},
],
},
]

## Steps to Determine Rotation Results

To determine the rotation result of a function, follow these steps:

- Determine the rotation center point and desired rotation angle
- Select several points on the original function graph as samples
- Apply the rotation formula to each sample point
- Connect the rotation result points to form a new function graph
- Verify the result by checking several additional points

## Exercises

1. Determine the rotation result of point $$(3, 4)$$ around the origin with a $$90^\circ$$ counterclockwise angle.

2. Function $$f(x) = x^2 - 2x + 1$$ is rotated $$180^\circ$$ around the origin. Determine the coordinates of the rotation result vertex if the original vertex is at $$(1, 0)$$.

3. Line $$y = 3x - 2$$ is rotated $$270^\circ$$ around the origin. Determine the equation of the rotation result line.

4. Point $$(2, 5)$$ is rotated $$60^\circ$$ around point $$(1, 1)$$. Determine the rotation result coordinates.

5. Function $$y = \sqrt{x}$$ for $$x \geq 0$$ is rotated $$90^\circ$$ counterclockwise around the origin. Explain the shape of the rotation result graph.

Visible text: 1. Determine the rotation result of point around the origin with a counterclockwise angle.

2. Function is rotated around the origin. Determine the coordinates of the rotation result vertex if the original vertex is at .

3. Line is rotated around the origin. Determine the equation of the rotation result line.

4. Point is rotated around point . Determine the rotation result coordinates.

5. Function for is rotated counterclockwise around the origin. Explain the shape of the rotation result graph.

### Answer Key

1. Using the $$90^\circ$$ rotation formula:

   <MathContainer>
   
   
   ```math
   (x, y) \rightarrow (-y, x)
   ```

   
   
   ```math
   (3, 4) \rightarrow (-4, 3)
   ```

   </MathContainer>

   So the rotation result is $$(-4, 3)$$.

   <LineEquation
     title={<>Visualization of Point $$(3, 4)$$ Rotation</>}
     description={<>$$90^\circ$$ counterclockwise rotation around origin.</>}
     cameraPosition={[8, 6, 8]}
     data={[
       {
         points: [
           { x: 0, y: 0, z: 0 },
           { x: 3, y: 4, z: 0 }
         ],
         color: getColor("PURPLE"),
         showPoints: false,
         labels: [
           {
             text: "(3, 4)",
             at: 1,
             offset: [0.3, 0.3, 0],
           },
         ],
         cone: { position: "end", size: 0.3 }
       },
       {
         points: [
           { x: 0, y: 0, z: 0 },
           { x: -4, y: 3, z: 0 }
         ],
         color: getColor("ORANGE"),
         showPoints: false,
         labels: [
           {
             text: "(-4, 3)",
             at: 1,
             offset: [-0.5, 0.3, 0],
           },
         ],
         cone: { position: "end", size: 0.3 }
       },
     ]}
   />

2. Original vertex rotated $$180^\circ$$:

   <MathContainer>
   
   
   ```math
   (x, y) \rightarrow (-x, -y)
   ```

   
   
   ```math
   (1, 0) \rightarrow (-1, 0)
   ```

   </MathContainer>

   The coordinates of the rotation result vertex are $$(-1, 0)$$.

   <LineEquation
     title={<>Rotation of Function $$f(x) = x^2 - 2x + 1$$</>}
     description={<>$$180^\circ$$ rotation around origin.</>}
     cameraPosition={[10, 6, 10]}
     data={[
       {
         points: Array.from({ length: 21 }, (_, i) => {
           const x = (i - 10) * 0.3;
           const y = x * x - 2 * x + 1;
           return { x, y, z: 0 };
         }),
         color: getColor("TEAL"),
         showPoints: false,
         labels: [
           {
             text: "f(x) = x² - 2x + 1",
             at: 18,
             offset: [1, 0.5, 0],
           },
         ],
       },
       {
         points: Array.from({ length: 21 }, (_, i) => {
           const x = (i - 10) * 0.3;
           const y = x * x - 2 * x + 1;
           // 180° rotation: (x,y) → (-x,-y)
           const xRotated = -x;
           const yRotated = -y;
           return { x: xRotated, y: yRotated, z: 0 };
         }),
         color: getColor("VIOLET"),
         showPoints: false,
         labels: [
           {
             text: "180° Rotation Result",
             at: 8,
             offset: [-0.5, -0.5, 0],
           },
         ],
       },
     ]}
   />

3. Take two points on the line and rotate $$270^\circ$$:

   <MathContainer>
   
   
   ```math
   (x, y) \rightarrow (y, -x)
   ```

   
   
   ```math
   (0, -2) \rightarrow (-2, 0)
   ```

   
   
   ```math
   (1, 1) \rightarrow (1, -1)
   ```

   
   
   ```math
   m = \frac{-1 - 0}{1 - (-2)} = \frac{-1}{3}
   ```

   
   
   ```math
   y = -\frac{1}{3}x - \frac{2}{3}
   ```

   </MathContainer>

   So the equation of the rotation result line is $$y = -\frac{1}{3}x - \frac{2}{3}$$.

   <LineEquation
     title={<>Rotation of Line $$y = 3x - 2$$</>}
     description={<>$$270^\circ$$ rotation around origin.</>}
     cameraPosition={[8, 6, 8]}
     data={[
       {
         points: Array.from({ length: 11 }, (_, i) => {
           const x = (i - 5) * 0.8;
           const y = 3 * x - 2;
           return { x, y, z: 0 };
         }),
         color: getColor("EMERALD"),
         showPoints: false,
         labels: [
           {
             text: "y = 3x - 2",
             at: 6,
             offset: [2, 0.5, 0],
           },
         ],
       },
       {
         points: Array.from({ length: 11 }, (_, i) => {
           const x = (i - 5) * 0.8;
           const y = 3 * x - 2;
           // 270° rotation: (x,y) → (y,-x)
           const xRotated = y;
           const yRotated = -x;
           return { x: xRotated, y: yRotated, z: 0 };
         }),
         color: getColor("AMBER"),
         showPoints: false,
         labels: [
           {
             text: "y = -⅓x - ⅔",
             at: 5,
             offset: [-0.5, 1.5, 0],
           },
         ],
       },
     ]}
   />

4. Using the rotation formula around a point with $$60^\circ$$ angle:

   <MathContainer>
   <BlockMath math="x' = (x-a) \cos \theta - (y-b) \sin \theta + a" />
   <BlockMath math="y' = (x-a) \sin \theta + (y-b) \cos \theta + b" />
   <BlockMath math="x' = (2-1) \cdot \frac{1}{2} - (5-1) \cdot \frac{\sqrt{3}}{2} + 1" />
   <BlockMath math="x' = \frac{3}{2} - 2\sqrt{3}" />
   <BlockMath math="y' = (2-1) \cdot \frac{\sqrt{3}}{2} + (5-1) \cdot \frac{1}{2} + 1" />
   <BlockMath math="y' = 3 + \frac{\sqrt{3}}{2}" />
   </MathContainer>

   Rotation result coordinates: $$(\frac{3}{2} - 2\sqrt{3}, 3 + \frac{\sqrt{3}}{2})$$

   <LineEquation
     title={<>Rotation of Point $$(2, 5)$$ Around Point $$(1, 1)$$</>}
     description={<>$$60^\circ$$ counterclockwise rotation.</>}
     cameraPosition={[8, 6, 8]}
     data={[
       {
         points: [
           { x: 1, y: 1, z: 0 },
           { x: 2, y: 5, z: 0 }
         ],
         color: getColor("CYAN"),
         showPoints: false,
         labels: [
           {
             text: "(2, 5)",
             at: 1,
             offset: [0.3, 0.3, 0],
           },
           {
             text: "Center (1, 1)",
             at: 0,
             offset: [0.3, -0.3, 0],
           },
         ],
         cone: { position: "end", size: 0.3 }
       },
       {
         points: [
           { x: 1, y: 1, z: 0 },
           { x: 1.5 - 2 * Math.sqrt(3), y: 3 + Math.sqrt(3) / 2, z: 0 }
         ],
         color: getColor("PINK"),
         showPoints: false,
         labels: [
           {
             text: "Rotation Result",
             at: 1,
             offset: [-0.5, 0.3, 0],
           },
         ],
         cone: { position: "end", size: 0.3 }
       },
     ]}
   />

5. Function $$y = \sqrt{x}$$ rotated $$90^\circ$$ becomes:

   <MathContainer>
   
   
   ```math
   x = -\sqrt{y}
   ```

   
   
   ```math
   y = x^2 \text{ for} x \leq 0
   ```

   </MathContainer>

   The rotation result graph forms a parabola that opens upward with domain $$x \leq 0$$ and range $$y \geq 0$$. This is a reflection of parabola $$y = x^2$$ across the $$y$$-axis.

   <LineEquation
     title={<>Rotation of Function $$y = \sqrt{x}$$</>}
     description={<>$$90^\circ$$ counterclockwise rotation around origin.</>}
     cameraPosition={[8, 6, 8]}
     data={[
       {
         points: Array.from({ length: 21 }, (_, i) => {
           const x = i * 0.25;
           const y = Math.sqrt(x);
           return { x, y, z: 0 };
         }),
         color: getColor("LIME"),
         showPoints: false,
         labels: [
           {
             text: "y = √x",
             at: 15,
             offset: [0.5, 0.3, 0],
           },
         ],
       },
       {
         points: Array.from({ length: 21 }, (_, i) => {
           const x = i * 0.25;
           const y = Math.sqrt(x);
           // 90° rotation: (x,y) → (-y,x)
           const xRotated = -y;
           const yRotated = x;
           return { x: xRotated, y: yRotated, z: 0 };
         }),
         color: getColor("ROSE"),
         showPoints: false,
         labels: [
           {
             text: "y = x² (x ≤ 0)",
             at: 15,
             offset: [-0.8, 0.3, 0],
           },
         ],
       },
     ]}
   />

Visible text: 1. Using the rotation formula:

 <MathContainer>
 
 

 
 

 </MathContainer>

 So the rotation result is .

 <LineEquation
 title={<>Visualization of Point Rotation</>}
 description={<> counterclockwise rotation around origin.</>}
 cameraPosition={[8, 6, 8]}
 data={[
 {
 points: [
 { x: 0, y: 0, z: 0 },
 { x: 3, y: 4, z: 0 }
 ],
 color: getColor("PURPLE"),
 showPoints: false,
 labels: [
 {
 text: "(3, 4)",
 at: 1,
 offset: [0.3, 0.3, 0],
 },
 ],
 cone: { position: "end", size: 0.3 }
 },
 {
 points: [
 { x: 0, y: 0, z: 0 },
 { x: -4, y: 3, z: 0 }
 ],
 color: getColor("ORANGE"),
 showPoints: false,
 labels: [
 {
 text: "(-4, 3)",
 at: 1,
 offset: [-0.5, 0.3, 0],
 },
 ],
 cone: { position: "end", size: 0.3 }
 },
 ]}
 />

2. Original vertex rotated :

 <MathContainer>
 
 

 
 

 </MathContainer>

 The coordinates of the rotation result vertex are .

 <LineEquation
 title={<>Rotation of Function </>}
 description={<> rotation around origin.</>}
 cameraPosition={[10, 6, 10]}
 data={[
 {
 points: Array.from({ length: 21 }, (_, i) => {
 const x = (i - 10) * 0.3;
 const y = x * x - 2 * x + 1;
 return { x, y, z: 0 };
 }),
 color: getColor("TEAL"),
 showPoints: false,
 labels: [
 {
 text: "f(x) = x² - 2x + 1",
 at: 18,
 offset: [1, 0.5, 0],
 },
 ],
 },
 {
 points: Array.from({ length: 21 }, (_, i) => {
 const x = (i - 10) * 0.3;
 const y = x * x - 2 * x + 1;
 // 180° rotation: (x,y) → (-x,-y)
 const xRotated = -x;
 const yRotated = -y;
 return { x: xRotated, y: yRotated, z: 0 };
 }),
 color: getColor("VIOLET"),
 showPoints: false,
 labels: [
 {
 text: "180° Rotation Result",
 at: 8,
 offset: [-0.5, -0.5, 0],
 },
 ],
 },
 ]}
 />

3. Take two points on the line and rotate :

 <MathContainer>
 
 

 
 

 
 

 
 

 
 

 </MathContainer>

 So the equation of the rotation result line is .

 <LineEquation
 title={<>Rotation of Line </>}
 description={<> rotation around origin.</>}
 cameraPosition={[8, 6, 8]}
 data={[
 {
 points: Array.from({ length: 11 }, (_, i) => {
 const x = (i - 5) * 0.8;
 const y = 3 * x - 2;
 return { x, y, z: 0 };
 }),
 color: getColor("EMERALD"),
 showPoints: false,
 labels: [
 {
 text: "y = 3x - 2",
 at: 6,
 offset: [2, 0.5, 0],
 },
 ],
 },
 {
 points: Array.from({ length: 11 }, (_, i) => {
 const x = (i - 5) * 0.8;
 const y = 3 * x - 2;
 // 270° rotation: (x,y) → (y,-x)
 const xRotated = y;
 const yRotated = -x;
 return { x: xRotated, y: yRotated, z: 0 };
 }),
 color: getColor("AMBER"),
 showPoints: false,
 labels: [
 {
 text: "y = -⅓x - ⅔",
 at: 5,
 offset: [-0.5, 1.5, 0],
 },
 ],
 },
 ]}
 />

4. Using the rotation formula around a point with angle:

 <MathContainer>
 <BlockMath math="x' = (x-a) \cos \theta - (y-b) \sin \theta + a" />
 <BlockMath math="y' = (x-a) \sin \theta + (y-b) \cos \theta + b" />
 <BlockMath math="x' = (2-1) \cdot \frac{1}{2} - (5-1) \cdot \frac{\sqrt{3}}{2} + 1" />
 <BlockMath math="x' = \frac{3}{2} - 2\sqrt{3}" />
 <BlockMath math="y' = (2-1) \cdot \frac{\sqrt{3}}{2} + (5-1) \cdot \frac{1}{2} + 1" />
 <BlockMath math="y' = 3 + \frac{\sqrt{3}}{2}" />
 </MathContainer>

 Rotation result coordinates: 

 <LineEquation
 title={<>Rotation of Point Around Point </>}
 description={<> counterclockwise rotation.</>}
 cameraPosition={[8, 6, 8]}
 data={[
 {
 points: [
 { x: 1, y: 1, z: 0 },
 { x: 2, y: 5, z: 0 }
 ],
 color: getColor("CYAN"),
 showPoints: false,
 labels: [
 {
 text: "(2, 5)",
 at: 1,
 offset: [0.3, 0.3, 0],
 },
 {
 text: "Center (1, 1)",
 at: 0,
 offset: [0.3, -0.3, 0],
 },
 ],
 cone: { position: "end", size: 0.3 }
 },
 {
 points: [
 { x: 1, y: 1, z: 0 },
 { x: 1.5 - 2 * Math.sqrt(3), y: 3 + Math.sqrt(3) / 2, z: 0 }
 ],
 color: getColor("PINK"),
 showPoints: false,
 labels: [
 {
 text: "Rotation Result",
 at: 1,
 offset: [-0.5, 0.3, 0],
 },
 ],
 cone: { position: "end", size: 0.3 }
 },
 ]}
 />

5. Function rotated becomes:

 <MathContainer>
 
 

 
 

 </MathContainer>

 The rotation result graph forms a parabola that opens upward with domain and range . This is a reflection of parabola across the -axis.

 <LineEquation
 title={<>Rotation of Function </>}
 description={<> counterclockwise rotation around origin.</>}
 cameraPosition={[8, 6, 8]}
 data={[
 {
 points: Array.from({ length: 21 }, (_, i) => {
 const x = i * 0.25;
 const y = Math.sqrt(x);
 return { x, y, z: 0 };
 }),
 color: getColor("LIME"),
 showPoints: false,
 labels: [
 {
 text: "y = √x",
 at: 15,
 offset: [0.5, 0.3, 0],
 },
 ],
 },
 {
 points: Array.from({ length: 21 }, (_, i) => {
 const x = i * 0.25;
 const y = Math.sqrt(x);
 // 90° rotation: (x,y) → (-y,x)
 const xRotated = -y;
 const yRotated = x;
 return { x: xRotated, y: yRotated, z: 0 };
 }),
 color: getColor("ROSE"),
 showPoints: false,
 labels: [
 {
 text: "y = x² (x ≤ 0)",
 at: 15,
 offset: [-0.8, 0.3, 0],
 },
 ],
 },
 ]}
 />