Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Introduction to Matrix Transformations | Linear Algebra Foundations
Mathematics for Data Science

bookIntroduction to Matrix Transformations

Matrix Equations

A matrix equation can be written as:

Ax⃗=b⃗A \vec{x} = \vec{b}

Where:

  • AA is the coefficient matrix;
  • xβƒ—\vec{x} is the vector of variables;
  • bβƒ—\vec{b} is the vector of constants.

Matrix Representation of Linear Systems

Consider the linear system:

2x+y=5xβˆ’y=12x + y = 5 \\ x - y = 1

This can be rewritten as:

[211βˆ’1][xy]=[51]\begin{bmatrix} 2 & 1 \\ 1 & -1 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} 5 \\ 1 \end{bmatrix}

Matrix Multiplication Breakdown

The multiplication of a matrix with a vector represents a linear combination:

[abcd][xy]=[ax+bycx+dy]=x[ac]+y[bd]\begin{bmatrix} a & b \\ c & d \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} ax + by \\ cx + dy \end{bmatrix} = x \begin{bmatrix} a \\ c \end{bmatrix} + y\begin{bmatrix} b \\ d \end{bmatrix}

Example System in Matrix Form

The system:

3x+2y=74xβˆ’y=53x + 2y = 7 \\ 4x - y = 5

Can be expressed as:

[324βˆ’1][xy]=[75]\begin{bmatrix} 3 & 2 \\ 4 & -1 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} 7 \\ 5 \end{bmatrix}

Matrices as Transformations

A matrix transforms vectors in space.

For example:

A=[abcd],Β Β v1βƒ—=[11],Β Β v2βƒ—=[112]A = \begin{bmatrix} a & b \\ c & d \end{bmatrix},\ \ \vec{v_1} = \begin{bmatrix}1 \\ 1\end{bmatrix},\ \ \vec{v_2} = \begin{bmatrix}1 \\ \frac{1}{2}\end{bmatrix}

This matrix defines how the axes transform under multiplication.

Scaling with Matrices

To apply scaling to a vector use:

S=[sx00sy]S = \begin{bmatrix} s_x & 0 \\ 0 & s_y \end{bmatrix}

Where:

  • sxs_x - the scale factor in the x-direction;
  • sys_y - the scale factor in the y-direction.

Example: scaling point (2, 3) by 2:

S=[2002],v⃗=[23]S = \begin{bmatrix} 2 & 0 \\ 0 & 2 \end{bmatrix}, \quad \vec{v} = \begin{bmatrix} 2 \\ 3 \end{bmatrix}

Then:

Sv⃗=[46]S \vec{v} = \begin{bmatrix} 4 \\ 6 \end{bmatrix}

Rotation with Matrices

To rotate a vector by angle ΞΈ\theta around the origin:

R=[cosβ‘ΞΈβˆ’sin⁑θsin⁑θcos⁑θ]R = \begin{bmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{bmatrix}

Example: rotate (2, 3) by 90Β°:

R=[cos⁑90ΒΊβˆ’sin⁑90ΒΊsin⁑90ΒΊcos⁑90ΒΊ]=[0βˆ’110],vβƒ—=[23]R = \begin{bmatrix} \cos90ΒΊ & -\sin90ΒΊ \\ \sin90ΒΊ & \cos90ΒΊ \end{bmatrix} = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}, \quad \vec{v} = \begin{bmatrix} 2 \\ 3 \end{bmatrix}

Then:

Rvβƒ—=[βˆ’32]R \vec{v} = \begin{bmatrix} -3 \\ 2 \end{bmatrix}

Reflection over the x-axis

Reflection matrix:

M=[100βˆ’1],M = \begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix},

Using v⃗=(2,3)\vec{v} = (2, 3):

Mvβƒ—=[2βˆ’3]M \vec{v} = \begin{bmatrix} 2 \\ -3 \end{bmatrix}

Shearing Transformation (x-direction shear)

Shearing shifts one axis based on the other.

To shear in the x-direction:

M=[1k01]M = \begin{bmatrix} 1 & k \\ 0 & 1 \end{bmatrix}

If k=1.5k = 1.5 and v⃗=(2,3)\vec{v} = (2, 3):

Mv⃗=[6.53]M \vec{v} = \begin{bmatrix} 6.5 \\ 3 \end{bmatrix}

Identity Transformation

The identity matrix performs no transformation:

I=[1001]I = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}

For any vector v⃗\vec{v}:

Iv⃗=v⃗I \vec{v} = \vec{v}
question mark

What is the matrix form of this system of equations?

2x+y=5xβˆ’y=12x + y = 5 \\ x - y = 1

Select the correct answer

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 4. ChapterΒ 5

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

Suggested prompts:

Can you explain how to solve a matrix equation for the variables?

What are some real-world applications of matrices and matrix transformations?

Can you show more examples of matrix transformations like rotation or scaling?

Awesome!

Completion rate improved to 1.96

bookIntroduction to Matrix Transformations

Swipe to show menu

Matrix Equations

A matrix equation can be written as:

Ax⃗=b⃗A \vec{x} = \vec{b}

Where:

  • AA is the coefficient matrix;
  • xβƒ—\vec{x} is the vector of variables;
  • bβƒ—\vec{b} is the vector of constants.

Matrix Representation of Linear Systems

Consider the linear system:

2x+y=5xβˆ’y=12x + y = 5 \\ x - y = 1

This can be rewritten as:

[211βˆ’1][xy]=[51]\begin{bmatrix} 2 & 1 \\ 1 & -1 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} 5 \\ 1 \end{bmatrix}

Matrix Multiplication Breakdown

The multiplication of a matrix with a vector represents a linear combination:

[abcd][xy]=[ax+bycx+dy]=x[ac]+y[bd]\begin{bmatrix} a & b \\ c & d \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} ax + by \\ cx + dy \end{bmatrix} = x \begin{bmatrix} a \\ c \end{bmatrix} + y\begin{bmatrix} b \\ d \end{bmatrix}

Example System in Matrix Form

The system:

3x+2y=74xβˆ’y=53x + 2y = 7 \\ 4x - y = 5

Can be expressed as:

[324βˆ’1][xy]=[75]\begin{bmatrix} 3 & 2 \\ 4 & -1 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} 7 \\ 5 \end{bmatrix}

Matrices as Transformations

A matrix transforms vectors in space.

For example:

A=[abcd],Β Β v1βƒ—=[11],Β Β v2βƒ—=[112]A = \begin{bmatrix} a & b \\ c & d \end{bmatrix},\ \ \vec{v_1} = \begin{bmatrix}1 \\ 1\end{bmatrix},\ \ \vec{v_2} = \begin{bmatrix}1 \\ \frac{1}{2}\end{bmatrix}

This matrix defines how the axes transform under multiplication.

Scaling with Matrices

To apply scaling to a vector use:

S=[sx00sy]S = \begin{bmatrix} s_x & 0 \\ 0 & s_y \end{bmatrix}

Where:

  • sxs_x - the scale factor in the x-direction;
  • sys_y - the scale factor in the y-direction.

Example: scaling point (2, 3) by 2:

S=[2002],v⃗=[23]S = \begin{bmatrix} 2 & 0 \\ 0 & 2 \end{bmatrix}, \quad \vec{v} = \begin{bmatrix} 2 \\ 3 \end{bmatrix}

Then:

Sv⃗=[46]S \vec{v} = \begin{bmatrix} 4 \\ 6 \end{bmatrix}

Rotation with Matrices

To rotate a vector by angle ΞΈ\theta around the origin:

R=[cosβ‘ΞΈβˆ’sin⁑θsin⁑θcos⁑θ]R = \begin{bmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{bmatrix}

Example: rotate (2, 3) by 90Β°:

R=[cos⁑90ΒΊβˆ’sin⁑90ΒΊsin⁑90ΒΊcos⁑90ΒΊ]=[0βˆ’110],vβƒ—=[23]R = \begin{bmatrix} \cos90ΒΊ & -\sin90ΒΊ \\ \sin90ΒΊ & \cos90ΒΊ \end{bmatrix} = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}, \quad \vec{v} = \begin{bmatrix} 2 \\ 3 \end{bmatrix}

Then:

Rvβƒ—=[βˆ’32]R \vec{v} = \begin{bmatrix} -3 \\ 2 \end{bmatrix}

Reflection over the x-axis

Reflection matrix:

M=[100βˆ’1],M = \begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix},

Using v⃗=(2,3)\vec{v} = (2, 3):

Mvβƒ—=[2βˆ’3]M \vec{v} = \begin{bmatrix} 2 \\ -3 \end{bmatrix}

Shearing Transformation (x-direction shear)

Shearing shifts one axis based on the other.

To shear in the x-direction:

M=[1k01]M = \begin{bmatrix} 1 & k \\ 0 & 1 \end{bmatrix}

If k=1.5k = 1.5 and v⃗=(2,3)\vec{v} = (2, 3):

Mv⃗=[6.53]M \vec{v} = \begin{bmatrix} 6.5 \\ 3 \end{bmatrix}

Identity Transformation

The identity matrix performs no transformation:

I=[1001]I = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}

For any vector v⃗\vec{v}:

Iv⃗=v⃗I \vec{v} = \vec{v}
question mark

What is the matrix form of this system of equations?

2x+y=5xβˆ’y=12x + y = 5 \\ x - y = 1

Select the correct answer

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 4. ChapterΒ 5
some-alt