# 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/geometric-transformation/matrix-transformation
Source: https://raw.githubusercontent.com/nakafaai/nakafa.com/refs/heads/main/packages/contents/material/lesson/mathematics/geometric-transformation/matrix-transformation/en.mdx

Learn how 2×2 matrices perform geometric transformations like rotations and reflections on points and shapes with worked examples.

---

## What is the Connection between Matrices and Geometric Transformations?

A $$2 \times 2$$ matrix can be associated with transformation operations on any point in the Cartesian plane.

Visible text: A matrix can be associated with transformation operations on any point in the Cartesian plane.

A point in the Cartesian plane, often symbolized by the ordered pair $$(x,y)$$, can also be symbolized by the position vector $$\begin{pmatrix} x \\ y \end{pmatrix}$$. This position vector notation will be frequently used in discussing the connection between matrices and transformations.

Visible text: A point in the Cartesian plane, often symbolized by the ordered pair , can also be symbolized by the position vector . This position vector notation will be frequently used in discussing the connection between matrices and transformations.

If a point $$P(x,y)$$ is transformed by the matrix $$M = \begin{pmatrix} a & b \\ c & d \end{pmatrix}$$, its image <InlineMath math="P'(x',y')" /> is obtained from matrix multiplication:

Visible text: If a point is transformed by the matrix , its image <InlineMath math="P'(x',y')" /> is obtained from matrix multiplication:

```math
\begin{pmatrix} x' \\ y' \end{pmatrix} = \begin{pmatrix} a & b \\ c & d \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} ax + by \\ cx + dy \end{pmatrix}
```

Thus, <InlineMath math="x' = ax + by" /> and <InlineMath math="y' = cx + dy" />.

## Multiplying a Matrix by a Position Vector

If $$\begin{pmatrix} x \\ y \end{pmatrix}$$ represents any point in the Cartesian plane, find the product of $$\begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix}$$.

Visible text: If represents any point in the Cartesian plane, find the product of .

**Alternative Solution:**

The matrix product is:

```math
\begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} (0)(x) + (-1)(y) \\ (1)(x) + (0)(y) \end{pmatrix} = \begin{pmatrix} -y \\ x \end{pmatrix}
```

It can be observed that the point $$(x,y)$$ is transformed by the matrix $$\begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix}$$ into the point $$(-y,x)$$. This is the formula for a $$90^\circ$$ counter-clockwise rotation about the origin.

Visible text: It can be observed that the point is transformed by the matrix into the point . This is the formula for a counter-clockwise rotation about the origin.

Component: LineEquation
Props:
- title: Transformation of Point $$P(2,3)$$ by Matrix{" "}
$$\begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix}$$
  Visible text: Transformation of Point by Matrix{" "}
- description: Point $$P(2,3)$$ is transformed into{" "}
<InlineMath math="P'(-3,2)" />.
  Visible text: Point is transformed into{" "}
<InlineMath math="P'(-3,2)" />.
- 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: 3, z: 0 }],
color: getColor("SKY"),
showPoints: true,
labels: [{ text: "P(2,3)", at: 0, offset: [0.3, 0.3, 0] }],
},
{
points: [{ x: -3, y: 2, z: 0 }],
color: getColor("EMERALD"),
showPoints: true,
labels: [{ text: "P'(-3,2)", at: 0, offset: [-0.7, 0.3, 0] }],
},
{
points: [
{ x: 0, y: 0, z: 0 },
{ x: 2, y: 3, z: 0 },
],
color: getColor("INDIGO"),
},
{
points: [
{ x: 0, y: 0, z: 0 },
{ x: -3, y: 2, z: 0 },
],
color: getColor("INDIGO"),
},
]
- showZAxis: false
- cameraPosition: [0, 0, 10]

## Multiplying a Matrix by Three Points Simultaneously

Find the image of $$\triangle ABC$$, with vertices $$A(1,1)$$, $$B(4,1)$$, and $$C(4,2)$$ transformed by the matrix $$\begin{pmatrix} -1 & 0 \\ 0 & -1 \end{pmatrix}$$.

Visible text: Find the image of , with vertices , , and transformed by the matrix .

**Alternative Solution:**

First, we can write the coordinates of the points as columns of a matrix, i.e., $$\begin{pmatrix} 1 & 4 & 4 \\ 1 & 1 & 2 \end{pmatrix}$$ (Columns A, B, C).

Visible text: First, we can write the coordinates of the points as columns of a matrix, i.e., (Columns A, B, C).

Next, multiply this matrix from the left by $$\begin{pmatrix} -1 & 0 \\ 0 & -1 \end{pmatrix}$$.

Visible text: Next, multiply this matrix from the left by .

Component: MathContainer
Children:

```math
\begin{pmatrix} -1 & 0 \\ 0 & -1 \end{pmatrix} \begin{pmatrix} 1 & 4 & 4 \\ 1 & 1 & 2 \end{pmatrix} = \begin{pmatrix} (-1)(1)+(0)(1) & (-1)(4)+(0)(1) & (-1)(4)+(0)(2) \\ (0)(1)+(-1)(1) & (0)(4)+(-1)(1) & (0)(4)+(-1)(2) \end{pmatrix}
```

```math
= \begin{pmatrix} -1 & -4 & -4 \\ -1 & -1 & -2 \end{pmatrix}
```

The result of the transformation is a new triangle <InlineMath math="\triangle A'B'C'" /> with vertices <InlineMath math="A'(-1,-1)" />, <InlineMath math="B'(-4,-1)" />, and <InlineMath math="C'(-4,-2)" />.

The matrix $$\begin{pmatrix} -1 & 0 \\ 0 & -1 \end{pmatrix}$$ represents a $$180^\circ$$ rotation about the origin.

Visible text: The matrix represents a rotation about the origin.

Component: LineEquation
Props:
- title: Transformation of $$\triangle ABC$$ by Matrix{" "}
$$\begin{pmatrix} -1 & 0 \\ 0 & -1 \end{pmatrix}$$
  Visible text: Transformation of by Matrix{" "}
- description: Triangle $$ABC$$ is transformed into{" "}
<InlineMath math="A'B'C'" />.
  Visible text: Triangle is transformed into{" "}
<InlineMath math="A'B'C'" />.
- data: [
// Triangle ABC (Original)
...[
{
from: { x: 1, y: 1, z: 0, label: "A(1,1)" },
to: { x: 4, y: 1, z: 0, label: "B(4,1)" },
},
{
from: { x: 4, y: 1, z: 0, label: "B(4,1)" },
to: { x: 4, y: 2, z: 0, label: "C(4,2)" },
},
{
from: { x: 4, y: 2, z: 0, label: "C(4,2)" },
to: { x: 1, y: 1, z: 0, label: "A(1,1)" },
},
].map((segment) => ({
points: [segment.from, segment.to],
color: getColor("AMBER"),
showPoints: true,
labels: [{ text: segment.from.label, at: 0, offset: [0.3, 0.3, 0] }],
})),
// Triangle A'B'C' (Image)
...[
{
from: { x: -1, y: -1, z: 0, label: "A'(-1,-1)" },
to: { x: -4, y: -1, z: 0, label: "B'(-4,-1)" },
},
{
from: { x: -4, y: -1, z: 0, label: "B'(-4,-1)" },
to: { x: -4, y: -2, z: 0, label: "C'(-4,-2)" },
},
{
from: { x: -4, y: -2, z: 0, label: "C'(-4,-2)" },
to: { x: -1, y: -1, z: 0, label: "A'(-1,-1)" },
},
].map((segment) => ({
points: [segment.from, segment.to],
color: getColor("TEAL"),
showPoints: true,
labels: [{ text: segment.from.label, at: 0, offset: [0.3, 0.3, 0] }],
})),
]
- showZAxis: false
- cameraPosition: [0, 0, 12]

## Exercises

1.  Find the product of $$\begin{pmatrix} 0 & 1 \\ -1 & 0 \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix}$$. What transformation does this matrix represent?
2.  A transformation is associated with the matrix $$\begin{pmatrix} 1 & 2 \\ 0 & 1 \end{pmatrix}$$. Find the image of a triangle with vertices $$A(2,0)$$, $$B(2,1)$$, and $$C(0,1)$$ under this transformation!

Visible text: 1. Find the product of . What transformation does this matrix represent?
2. A transformation is associated with the matrix . Find the image of a triangle with vertices , , and under this transformation!

### Key Answers

1.  
    
    ```math
    \begin{pmatrix} 0 & 1 \\ -1 & 0 \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} (0)(x) + (1)(y) \\ (-1)(x) + (0)(y) \end{pmatrix} = \begin{pmatrix} y \\ -x \end{pmatrix}
    ```

    The point $$(x,y)$$ is transformed into $$(y,-x)$$.

    This is a $$-90^\circ$$ (or $$270^\circ$$) clockwise rotation about the origin.

2.  Transformation matrix $$M = \begin{pmatrix} 1 & 2 \\ 0 & 1 \end{pmatrix}$$.

    Vertices: $$A(2,0)$$, $$B(2,1)$$, $$C(0,1)$$.

    Point matrix: $$\begin{pmatrix} 2 & 2 & 0 \\ 0 & 1 & 1 \end{pmatrix}$$.

    <MathContainer>
      
    
    ```math
    \begin{pmatrix} 1 & 2 \\ 0 & 1 \end{pmatrix} \begin{pmatrix} 2 & 2 & 0 \\ 0 & 1 & 1 \end{pmatrix} = \begin{pmatrix} (1)(2)+(2)(0) & (1)(2)+(2)(1) & (1)(0)+(2)(1) \\ (0)(2)+(1)(0) & (0)(2)+(1)(1) & (0)(0)+(1)(1) \end{pmatrix}
    ```

      
    
    ```math
    = \begin{pmatrix} 2+0 & 2+2 & 0+2 \\ 0+0 & 0+1 & 0+1 \end{pmatrix} = \begin{pmatrix} 2 & 4 & 2 \\ 0 & 1 & 1 \end{pmatrix}
    ```

    </MathContainer>

    Image vertices: <InlineMath math="A'(2,0)" />, <InlineMath math="B'(4,1)" />, <InlineMath math="C'(2,1)" />.

    (This transformation is known as a shear)

Visible text: 1. 
 

 The point is transformed into .

 This is a (or ) clockwise rotation about the origin.

2. Transformation matrix .

 Vertices: , , .

 Point matrix: .

 <MathContainer>
 
 

 
 

 </MathContainer>

 Image vertices: <InlineMath math="A'(2,0)" />, <InlineMath math="B'(4,1)" />, <InlineMath math="C'(2,1)" />.

 (This transformation is known as a shear)