Math Insight

Graphical interpretation of matrix-vector multiplication

Math 2241, Spring 2023
Name:
ID #:
Due date: Feb. 8, 2023, 11:59 p.m.
Table/group #:
Group members:
Total points: 1
  1. When we multiply a matrix by a vector, the result is another vector. If our vectors are two-dimensional, we can gain a graphical understanding of the relationship between the input vector and the output vector.

    The behavior of the matrix \begin{align*} A=\left[\begin{matrix}2 & 1\\2 & 3\end{matrix}\right] \end{align*} is demonstrated by the following applet. The solid arrows represent the input vectors. The dashed arrows show the output vectors, which are the result of multiplying the input vectors by the matrix $A$. In other words, if a solid arrow is the vector $\vc{v}$, then the corresponding dashed arrow is the vector $A\vc{v}$.

    Move the endpoint of each solid arrow to see how $A$ transforms the vector into the corresponding dashed vector. Observe how the behavior of $A$ changes as you move the arrows so that they represent different vectors. (Don't worry about the applet being marked correct until you get to part c.)

    Feedback from applet
    eigenvectors:
    Matrix-vector multiplication (Show)
    1. By exploring the behavior of $A$ for many different vectors, we can develop a qualitative description of $A$. First, observe how $A$ changes the length of vectors. Use the above applet to compare the length of the solid vector $\vc{v}$ and its dashed vector $A\vc{v}$ for different choices of the starting vector $\vc{v}$. Observe if none, some or all vectors stay the same length. Restricting attention to vectors that change length, observe if they all get shorter, all get longer, or some get shorter while others get longer. What do you conclude about the behavior of the matrix $A$?

    2. Another qualitative property is rotation. Some matrices will rotate vectors in a consistent direction. Other matrices will rotate different vectors different directions. Which is the case for $A$?

    3. A third property of interest is the existence of directions which are preserved under $A$. Specifically, we are interested in whether or not there are solid vectors $\vc{v}$ such that its corresponding dashed vector $A\vc{v}$ points in either the same direction as or exact opposite direction from $\vc{v}$. If we find such a special vector, we call it an eigenvector of $A$. Move one of the vectors in the above applet so it corresponds to an eigenvector (i.e., the solid and dashed vectors are lined up).

      If you find such an eigenvector, observe that it remains an eigenvector even if you stretch it (as long as it points in the same direction). So really, an eigenvector is representing a direction in which $A$ does not rotate, but just stretches or shrinks. Moreover, observe that if you flip an eigenvector so it points in exactly the opposite direction, it still is not rotated. If $A$ stretches in one direction, it will always stretch the same way in the opposite direction. (Think about how that is true if you stretch a rubber sheet.) When talking about eigenvectors, a direction and its opposite are considered the same direction. For example, the vectors $(1,-1)$ and $(-1,1)$ represent the same direction in this context. Similarly, if multiplication by $A$ flips a vector so that it points in the opposite direction, the vector is still an eigenvector; we don't considering this flipping by $A$ as actually changing the vector's direction.

      For a $2 \times 2$ matrix such as the above $A$, there can be zero, one, or two such eigenvector directions where $A$ does not rotate.

      In how many directions does $A$ have eigenvectors?
      Of these, in how many directions does $A$ flip the eigenvectors?

      Oops, we just lied. (Show)

      We'll learn to how calculate eigenvectors without the assistance of an applet later. For now, we want to find directions in which $A$ stretches or flips vectors. Move the solid arrows until each corresponding dashed arrow is a stretched and/or flipped version of the solid arrow. Then each solid arrow will be representing an eigenvector. Move one solid arrow to correspond to one direction and the other solid arrow to correspond to the other direction. (The arrows most not point in opposite directions, as that's considered the same direction.)

      Enter the values of the two eigenvectors. We'll call them $\vc{v}_1$ and $\vc{v}_2$ for later reference.
      Eigenvectors:
      $\vc{v}_1 =$
      , $\vc{v}_2 =$

      Since the length of the eigenvector doesn't matter, any scalar multiple will be graded as correct.

    4. If we take a vector $\vc{v}$ and multiply it by a number, say $2$, then the vector $\vc{v}$ and the new vector $2\vc{v}$ point in the same direction. The vector $2\vc{v}$ is just a stretched version of $\vc{v}$ so that it is twice as long. If we multiply $\vc{v}$ by a negative number, say $-0.5$, then the new vector $-0.5\vc{v}$ points in the opposite direction as $\vc{v}$ and is half as long. But, remember, even in this case, we can still say that $-0.5\vc{v}$ points in the same direction as $\vc{v}$. In fact, if we multiply $\vc{v}$ by any nonzero number, it will still point in the same direction. If $c$ is any nonzero number, then $c\vc{v}$ points in the same direction as $\vc{v}$. When talking about eigenvectors, we don't use the letter $c$, but instead we use the Greek letter $\lambda$ (lambda). If $\lambda$ is any nonzero number, then the vector $\lambda \vc{v}$ points in the same direction as $\vc{v}$.

      Above, though, we weren't multiplying $\vc{v}$ by a single number like $2$, $c$, or $\lambda$. instead, we were multiplying by a matrix $A$. However, if $\vc{v}$ is an eigenvector of $A$, then the multiplying by the matrix $A$ does the same thing as multiplying by a number: multiplying by $A$ simply stretches, shrinks, and/or flips the eigenvector $\vc{v}$. We can find a number $\lambda$ that does the same thing as multiplying by $A$, i.e., we can find a number $\lambda$ so that $A \vc{v} = \lambda \vc{v}$. The value of $\lambda$ is called the eigenvalue of $A$ corresponding to the eigenvector $\vc{v}$.

      Since we know the eigenvectors $\vc{v}_1$ and $\vc{v}_2$, we can compute the eigenvalues by simply multiplying the eigenvectors by $A$ and seeing how much $A$ stretches, shrinks, and/or flips. To save you time, you can use the above applet to compute the matrix-vector multiplications. If you reveal the Matrix-vector multiplication section below the applet, you can see the result of multiplying each vector $\vc{v}$ by the matrix $A$. (In that section, the blue solid vector is represented by $\vc{v}_1$ and the green solid vector by $\vc{v}_2$, but below use what you called $\vc{v}_1$ and $\vc{v}_2$ in part c.) What is the result of multiplying the eigenvectors by $A$?
      $A\vc{v_1}=$
      , $A\vc{v_2}=$

      If $\vc{v}$ is an eigenvector of $A$, then $A\vc{v}$ should be equal to multiplying each component of $\vc{v}$ by some number $\lambda$. To find the number $\lambda$, take the first component of $A\vc{v}$ and divide it by the first component of $\vc{v}$. As a double check, take the second component of $A\vc{v}$ and divide it by the second component of $\vc{v}$. If $\vc{v}$ is an eigenvector, then both calculations should have given you the same number: the eigenvalue $\lambda$. (Do this for both $\vc{v}_1$ and $\vc{v}_2$, calculating two corresponding eigenvalues, $\lambda_1$ and $\lambda_2$.)
      Eigenvalues:
      $\lambda_1 =$
      , $\lambda_2 =$

  2. Let's repeat these calculations for another matrix. The behavior of the matrix \begin{align*} A=\left[\begin{matrix}2 & 3\\2 & 1\end{matrix}\right] \end{align*} is demonstrated by the following applet. The solid vectors represent the input vectors. The dashed vectors show the output vectors, which are the result of multiplying the matrix $A$ by the input vectors. Move the endpoints of the solid vectors to see what happens to different vectors.
    Matrix-vector multiplication (Show)
    1. How does $A$ change the length of vectors?

    2. How does $A$ rotate vectors?

    3. Remembering that opposite directions corresponds to the same direction, in how many directions does $A$ have eigenvectors?
      Of these, in how many directions does $A$ flip the eigenvectors?

      Use the applet to find the directions where $A$ stretches or flips, i.e. find the eigenvectors. Move the solid arrows until the corresponding dashed arrow is a stretched and/or flipped version of the solid arrow. When this occurs, then we know that $A\vc{v}=\lambda \vc{v}$, where $\vc{v}$ is the vector represented by the solid arrow and $\lambda \vc{v}$ is the stretched and/or flipped vector represented by the dashed arrow. If there are no such directions, enter none in both spots. If there is only one such direction, enter the eigenvector in the first spot and none in the second spot. If there are two directions, enter the eigenvectors in either order. Any scalar multiple will be graded as correct.

      Eigenvectors:
      $\vc{v}_1 = $
      , $\vc{v}_2 =$

    4. Multiply each eigenvector that you found above by $A$. If you entered none instead of an eigenvector, enter none again.
      $A\vc{v_1}=$
      , $A\vc{v_2}=$

      (You can calculate the matrix-vector products directly or check out the matrix-vector multiplication just below the above applet.)

      The eigenvalue $\lambda$ corresponding to the eigenvector $\vc{v}$ satisfies $A\vc{v}=\lambda \vc{v}$. Now that we have $A\vc{v_1}$ and $A\vc{v_2}$, we can compute the eigenvalues. Enter the eigenvalues in the same order as their corresponding eigenvectors.
      Eigenvalues:
      $\lambda_1 =$
      , $\lambda_2 =$

  3. The behavior of the matrix \begin{align*} A=\left[\begin{matrix}-1 & - \frac{1}{2}\\\frac{1}{2} & 0\end{matrix}\right] \end{align*} is demonstrated by the following applet. The solid vectors represent the input vectors. The dashed vectors show the output vectors, which are the result of multiplying the matrix $A$ by the input vectors. Move the endpoints of the solid vectors to see what happens to different vectors.
    Matrix-vector multiplication (Show)
    1. Let's use the applet to get a qualitative description of $A$. There are a few properties of interest. First is the question of scaling, which gives us an idea of the change in the length of vectors. There are several possibilities here. None, some, or all vectors may stay the same length. If not all vectors stay the same length, the ones that don't may either all get longer, all get shorter, or some vectors get longer and some vectors get shorter. Which is the case for the matrix $A$? Compare the lengths of the solid and dashed vectors for different choices of the starting vector to determine this.

    2. Another qualitative property is rotation. Some matrices will rotate vectors in a consistent direction. Other matrices will rotate different vectors different directions. Which is the case for $A$?

    3. A third property of interest is the existence of directions which are preserved under $A$. Specifically, we are interested in whether or not there are vectors $\vc{v}$ such that $A\vc{v}$ points in either the same direction as or exact opposite direction from $\vc{v}$. We call such vectors eigenvectors. We often write this as $A\vc{v}=\lambda \vc{v}$, where $\lambda$ is some real number. We will learn how to find these without the assistance of an applet later. For now, we want to find directions in which $A$ stretches or flips vectors. For a $2\times 2$ matrix, there can be zero, one, or two such directions. For this purpose, we count opposite directions as the same, so that vectors $(1,-1)$ and $(-1,1)$ are considered to be the same direction.

      In how many directions does $A$ have eigenvectors?
      Of these, in how many directions does $A$ flip the eigenvectors?

      Use the applet to find the directions where $A$ stretches or flips, i.e. find the eigenvectors. Move the solid arrows until the corresponding dashed arrow is a stretched and/or flipped version of the solid arrow. When this occurs, then we know that $A\vc{v}=\lambda \vc{v}$, where $\vc{v}$ is the vector represented by the solid arrow and $\lambda \vc{v}$ is the stretched and/or flipped vector represented by the dashed arrow. If there are no such directions, enter none in both spots. If there is only one such direction, enter the eigenvector in the first spot and none in the second spot. If there are two directions, enter the eigenvectors in either order. Any scalar multiple will be graded as correct. Remember that to count as two different eigenvectors, the two solid arrows must not point in the same or the opposite directions.

      Eigenvectors:
      ,

    4. If we know the eigenvectors, we can compute the value of $\lambda$ for which $A\vc{v}=\lambda \vc{v}$. This value of $\lambda$ is known as the eigenvalue. Each coordinate of $A\vc{v}$ should be $\lambda$ times the corresponding coordinate of $\vc{v}$. To determine $\lambda$ for each eigenvector, we just need to divide the first coordinate of $A\vc{v}$ by the first coordinate of $\vc{v}$. First, we need to find $A\vc{v}$. Enter the product of $A$ with each of the eigenvectors found above, in the same order. If you entered none instead of an eigenvector, enter none again.
      $A\vc{v_1}=$
      , $A\vc{v_2}=$

      Now that we have $A\vc{v_1}$ and $A\vc{v_2}$, we can compute the eigenvalues. Enter the eigenvalues in the same order as their corresponding eigenvectors.
      Eigenvalues:

  4. The behavior of the matrix \begin{align*} A=\left[\begin{matrix}1 & -1\\1 & 1\end{matrix}\right] \end{align*} is demonstrated by the following applet. The solid vectors represent the input vectors. The dashed vectors show the output vectors, which are the result of multiplying the matrix $A$ by the input vectors. Move the endpoints of the solid vectors to see what happens to different vectors.
    Matrix-vector multiplication (Show)
    1. Let's use the applet to get a qualitative description of $A$. There are a few properties of interest. First is the question of scaling, which gives us an idea of the change in the length of vectors. There are several possibilities here. None, some, or all vectors may stay the same length. If not all vectors stay the same length, the ones that don't may either all get longer, all get shorter, or some vectors get longer and some vectors get shorter. Which is the case for the matrix $A$? Compare the lengths of the solid and dashed vectors for different choices of the starting vector to determine this.

    2. Another qualitative property is rotation. Some matrices will rotate vectors in a consistent direction. Other matrices will rotate different vectors different directions. Which is the case for $A$?

    3. A third property of interest is the existence of directions which are preserved under $A$. Specifically, we are interested in whether or not there are vectors $\vc{v}$ such that $A\vc{v}$ points in either the same direction as or exact opposite direction from $\vc{v}$. We call such vectors eigenvectors. We often write this as $A\vc{v}=\lambda \vc{v}$, where $\lambda$ is some real number. We will learn how to find these without the assistance of an applet later. For now, we want to find directions in which $A$ stretches or flips vectors. For a $2\times 2$ matrix, there can be zero, one, or two such directions. For this purpose, we count opposite directions as the same, so that vectors $(1,-1)$ and $(-1,1)$ are considered to be the same direction.

      In how many directions does $A$ have eigenvectors?
      Of these, in how many directions does $A$ flip the eigenvectors?

      Use the applet to find the directions where $A$ stretches or flips, i.e. find the eigenvectors. Move the solid arrows until the corresponding dashed arrow is a stretched and/or flipped version of the solid arrow. When this occurs, then we know that $A\vc{v}=\lambda \vc{v}$, where $\vc{v}$ is the vector represented by the solid arrow and $\lambda \vc{v}$ is the stretched and/or flipped vector represented by the dashed arrow. If there are no such directions, enter none in both spots. If there is only one such direction, enter the eigenvector in the first spot and none in the second spot. If there are two directions, enter the eigenvectors in either order. Any scalar multiple will be graded as correct. Remember that to count as two different eigenvectors, the two solid arrows must not point in the same or the opposite directions.

      Eigenvectors:
      ,

    4. If we know the eigenvectors, we can compute the value of $\lambda$ for which $A\vc{v}=\lambda \vc{v}$. This value of $\lambda$ is known as the eigenvalue. Each coordinate of $A\vc{v}$ should be $\lambda$ times the corresponding coordinate of $\vc{v}$. To determine $\lambda$ for each eigenvector, we just need to divide the first coordinate of $A\vc{v}$ by the first coordinate of $\vc{v}$. First, we need to find $A\vc{v}$. Enter the product of $A$ with each of the eigenvectors found above, in the same order. If you entered none instead of an eigenvector, enter none again.
      $A\vc{v_1}=$
      , $A\vc{v_2}=$

      Now that we have $A\vc{v_1}$ and $A\vc{v_2}$, we can compute the eigenvalues. Enter the eigenvalues in the same order as their corresponding eigenvectors.

      Eigenvalues:

      Read only after answered question (Show)