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

bookChallenge: Combined Transformations of a Vector

Apply a scaling transformation and a 90° rotation to a 2D vector using Python and matrix multiplication. Visualize the result with arrows and coordinate labels from the origin.

You're working with a vector:

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

You will:

  1. Apply a scaling matrix:

    S=[2000.5]S = \begin{bmatrix}2 & 0 \\ 0 & 0.5\end{bmatrix}
  2. Apply a rotation matrix:

    R=[23]R = \begin{bmatrix}2 \\ 3\end{bmatrix}
  3. Combine them as:

R(Sv)R \cdot (S \cdot \vec{v})

This simulates what happens when a vector is first scaled and then rotated.

Taak

Swipe to start coding

  1. Complete the Python code below to:

    • Define the original vector;

    • Apply the scaling and rotation matrices;

    • Plot all vectors with labeled tips and coordinate axes;

  2. Verify that the output vectors are correct.

Oplossing

Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 4. Hoofdstuk 7
single

single

Vraag AI

expand

Vraag AI

ChatGPT

Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.

close

Awesome!

Completion rate improved to 1.89

bookChallenge: Combined Transformations of a Vector

Veeg om het menu te tonen

Apply a scaling transformation and a 90° rotation to a 2D vector using Python and matrix multiplication. Visualize the result with arrows and coordinate labels from the origin.

You're working with a vector:

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

You will:

  1. Apply a scaling matrix:

    S=[2000.5]S = \begin{bmatrix}2 & 0 \\ 0 & 0.5\end{bmatrix}
  2. Apply a rotation matrix:

    R=[23]R = \begin{bmatrix}2 \\ 3\end{bmatrix}
  3. Combine them as:

R(Sv)R \cdot (S \cdot \vec{v})

This simulates what happens when a vector is first scaled and then rotated.

Taak

Swipe to start coding

  1. Complete the Python code below to:

    • Define the original vector;

    • Apply the scaling and rotation matrices;

    • Plot all vectors with labeled tips and coordinate axes;

  2. Verify that the output vectors are correct.

Oplossing

Switch to desktopSchakel over naar desktop voor praktijkervaringGa verder vanaf waar je bent met een van de onderstaande opties
Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

close

Awesome!

Completion rate improved to 1.89
Sectie 4. Hoofdstuk 7
single

single

some-alt