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

Tarea

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.

Solución

¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 4. Capítulo 7
single

single

Pregunte a AI

expand

Pregunte a AI

ChatGPT

Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla

close

Awesome!

Completion rate improved to 1.89

bookChallenge: Combined Transformations of a Vector

Desliza para mostrar el menú

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.

Tarea

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.

Solución

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

close

Awesome!

Completion rate improved to 1.89
Sección 4. Capítulo 7
single

single

some-alt