Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære 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.

Opgave

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.

Løsning

Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 4. Kapitel 7
single

single

Spørg AI

expand

Spørg AI

ChatGPT

Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat

close

Awesome!

Completion rate improved to 1.89

bookChallenge: Combined Transformations of a Vector

Stryg for at vise menuen

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.

Opgave

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.

Løsning

Switch to desktopSkift til skrivebord for at øve i den virkelige verdenFortsæt der, hvor du er, med en af nedenstående muligheder
Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

close

Awesome!

Completion rate improved to 1.89
Sektion 4. Kapitel 7
single

single

some-alt