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

bookChallenge: Combined Transformations of a Vector

Task

Swipe to start coding

You are given a 2D vector:

v⃗=[23]\vec{v} = \begin{bmatrix} 2 \\ 3 \end{bmatrix}

Your goal is to apply a scaling transformation followed by a 90Β° rotation using matrix multiplication, and visualize the results with arrows and coordinate labels from the origin.

The transformations are defined as:

  • Scaling matrix: S=[2000.5]S = \begin{bmatrix} 2 & 0 \\ 0 & 0.5 \end{bmatrix}
  • Rotation matrix (90Β°): R=[0βˆ’110]R = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}

The combined transformation is applied as:

R⋅(S⋅v⃗)R \cdot (S \cdot \vec{v})

Your task:

  1. Define the original vector and the two matrices (S and R).
  2. Use matrix multiplication to compute:
    • The scaled vector.
    • The rotated vector.
    • The combined transformation.
  3. Plot all vectors (v, SΒ·v, and RΒ·(SΒ·v)) as arrows from the origin with labeled tips and visible coordinate axes.
  4. Verify that the computed vectors match the expected results after each transformation.

Solution

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 4. ChapterΒ 7
single

single

Ask AI

expand

Ask AI

ChatGPT

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

close

Awesome!

Completion rate improved to 1.96

bookChallenge: Combined Transformations of a Vector

Swipe to show menu

Task

Swipe to start coding

You are given a 2D vector:

v⃗=[23]\vec{v} = \begin{bmatrix} 2 \\ 3 \end{bmatrix}

Your goal is to apply a scaling transformation followed by a 90Β° rotation using matrix multiplication, and visualize the results with arrows and coordinate labels from the origin.

The transformations are defined as:

  • Scaling matrix: S=[2000.5]S = \begin{bmatrix} 2 & 0 \\ 0 & 0.5 \end{bmatrix}
  • Rotation matrix (90Β°): R=[0βˆ’110]R = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}

The combined transformation is applied as:

R⋅(S⋅v⃗)R \cdot (S \cdot \vec{v})

Your task:

  1. Define the original vector and the two matrices (S and R).
  2. Use matrix multiplication to compute:
    • The scaled vector.
    • The rotated vector.
    • The combined transformation.
  3. Plot all vectors (v, SΒ·v, and RΒ·(SΒ·v)) as arrows from the origin with labeled tips and visible coordinate axes.
  4. Verify that the computed vectors match the expected results after each transformation.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 4. ChapterΒ 7
single

single

some-alt