# Nakafa Framework: LLM
URL: https://nakafa.com/en/subject/high-school/11/mathematics/geometric-transformation/rotation-matrix
Source: https://raw.githubusercontent.com/nakafaai/nakafa.com/refs/heads/main/packages/contents/subject/high-school/11/mathematics/geometric-transformation/rotation-matrix/en.mdx
Output docs content for large language models.
---
import { getColor } from "@repo/design-system/lib/color";
import { LineEquation } from "@repo/design-system/components/contents/line-equation";
export const metadata = {
  title: "Rotation Matrix",
  description: "Learn rotation matrices for 2D transformations with derivation, formulas, and practical examples. Master rotations about origin and arbitrary points.",
  authors: [{ name: "Nabil Akbarazzima Fatih" }],
  date: "05/10/2025",
  subject: "Geometric Transformation",
};
## Finding the Rotation Matrix about the Origin
The image of a point  rotated about the origin  by an angle  is .
We want to find a  matrix, say , that represents this rotation transformation.
This matrix must satisfy:
From the matrix multiplication on the left side, we get:
By equating the corresponding components:
- First row: .
  For this equation to hold for all  and , the coefficients of  must be equal and the coefficients of  must be equal. Thus,  and .
- Second row: .
  Similarly,  and .
### Rotation Matrix about the Origin
The matrix associated with a rotation by an angle  radians (or degrees) about the origin  is:
## Matrix Operation for Rotation about an Arbitrary Point
To rotate a point  about an arbitrary point  by an angle , we perform three steps:
1. Translate the point  so that  becomes the origin: .
2. Rotate the translated point about the origin by  using the matrix .
3. Translate the rotated point back by adding .
### Matrix Operation for Rotation about an Arbitrary Point
The operation associated with rotation by an angle  radians about the point  is:
## Finding a Specific Rotation Matrix
The matrix associated with a rotation by  radians () about the origin is:
We know  and .
This is the required matrix.
      Visualization of Rotating Point (2,0) by {" "}
      about the Origin
    >
  }
  description={
    <>
      Point  is rotated by{" "}
       to become{" "}
      .{" "}
      .
    >
  }
  data={[
    {
      points: [{ x: 0, y: 0, z: 0 }],
      color: getColor("ROSE"),
      showPoints: true,
      labels: [{ text: "O", at: 0, offset: [0.3, -0.3, 0] }],
    },
    {
      points: [{ x: 2, y: 0, z: 0 }],
      color: getColor("SKY"),
      showPoints: true,
      labels: [{ text: "A(2,0)", at: 0, offset: [0.3, -0.3, 0] }],
    },
    {
      points: [{ x: Math.sqrt(2), y: Math.sqrt(2), z: 0 }],
      color: getColor("EMERALD"),
      showPoints: true,
      labels: [{ text: "A'(√2, √2)", at: 0, offset: [0.3, 0.3, 0] }],
    },
    {
      points: [
        { x: 0, y: 0, z: 0 },
        { x: 2, y: 0, z: 0 },
      ],
      color: getColor("INDIGO"),
    },
    {
      points: [
        { x: 0, y: 0, z: 0 },
        { x: Math.sqrt(2), y: Math.sqrt(2), z: 0 },
      ],
      color: getColor("INDIGO"),
    },
  ]}
  showZAxis={false}
  cameraPosition={[0, 0, 8]}
/>
## Exercises
1.  Determine the matrices associated with a rotation about the origin  by  radians.
2.  Determine the image of point  if it is rotated about the origin  by .
3.  Determine the image of point  if it is rotated about the point  by .
### Key Answers
1.  Given  or :
    
      
      
    
    Rotation matrix:
    
2.  Point , . , .
    
    Image: .
3.  Given point , center , . .
    
      
      
      
      
    
    Image: .