Skip to main content
Mathematics LibreTexts

2.3: Visualizing Matrix Arithmetic in 2D

  • Page ID
    63385
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Learning Objectives
    • T/F: Two vectors with the same length and direction are equal even if they start from different places.
    • One can visualize vector addition using what law?
    • T/F: Multiplying a vector by 2 doubles its length.
    • What do mathematicians do?
    • T/F: Multiplying a vector by a matrix always changes its length and direction.

    When we first learned about adding numbers together, it was useful to picture a number line: \(2+3=5\) could be pictured by starting at 0, going out 2 tick marks, then another 3, and then realizing that we moved 5 tick marks from 0. Similar visualizations helped us understand what \(2-3\) meant and what \(2\times 3\) meant.

    We now investigate a way to picture matrix arithmetic – in particular, operations involving column vectors. This not only will help us better understand the arithmetic operations, it will open the door to a great wealth of interesting study. Visualizing matrix arithmetic has a wide variety of applications, the most common being computer graphics. While we often think of these graphics in terms of video games, there are numerous other important applications. For example, chemists and biologists often use computer models to “visualize” complex molecules to “see” how they interact with other molecules.

    We will start with vectors in two dimensions (2D) – that is, vectors with only two entries. We assume the reader is familiar with the Cartesian plane, that is, plotting points and graphing functions on “the \(x\)\(y\) plane.” We graph vectors in a manner very similar to plotting points. Given the vector \[\vec{x}=\left[\begin{array}{c}{1}&{2}\end{array}\right] , \nonumber \] we draw \(\vec{x}\) by drawing an arrow whose tip is 1 unit to the right and 2 units up from its origin.\(^{1}\)

    clipboard_ee100fecf16758ba73c9bc5e1df4f16c9.png

    Figure \(\PageIndex{1}\): Various drawings of \(\vec{x}\)

    When drawing vectors, we do not specify where you start drawing; all we specify is where the tip lies based on where we started. Figure \(\PageIndex{1}\) shows vector \(\vec{x}\) drawn 3 ways. In some ways, the “most common” way to draw a vector has the arrow start at the origin, but this is by no means the only way of drawing the vector.

    Let’s practice this concept by drawing various vectors from given starting points.

    Example \(\PageIndex{1}\)

    Let

    \[\vec{x}=\left[\begin{array}{c}{1}\\{-1}\end{array}\right]\quad\vec{y}=\left[\begin{array}{c}{2}\\{3}\end{array}\right]\quad\text{and}\quad\vec{z}=\left[\begin{array}{c}{-3}\\{2}\end{array}\right] . \nonumber \]

    Draw \(\vec{x}\) starting from the point \((0, −1)\); draw \(\vec{y}\) starting from the point \((−1, −1)\), and draw \(\vec{z}\) starting from the point \((2, −1)\).

    Solution

    To draw \(\vec{x}\), start at the point \((0,-1)\) as directed, then move to the right one unit and down one unit and draw the tip. Thus the arrow “points” from \((0,-1)\) to \((1,-2)\).

    To draw \(\vec{y}\), we are told to start and the point \((-1,-1)\). We draw the tip by moving to the right 2 units and up 3 units; hence \(\vec{y}\) points from \((-1,-1)\) to (1,2).

    To draw \(\vec{z}\), we start at \((2,-1)\) and draw the tip 3 units to the left and 2 units up; \(\vec{z}\) points from \((2,-1)\) to \((-1,1)\).

    Each vector is drawn as shown in Figure \(\PageIndex{2}\).

    clipboard_e7a44062393d3b40d4a18c77636bf4f4d.png

    Figure \(\PageIndex{2}\): Drawing vectors \(\vec{x}\), \(\vec{y}\) and \(\vec{z}\) in Example \(\PageIndex{1}\)

    How does one draw the zero vector, \(\vec{0}=\left[\begin{array}{c}{0}\\{0}\end{array}\right]\)?\(^{2}\) Following our basic procedure, we start by going 0 units in the \(x\) direction, followed by 0 units in the \(y\) direction. In other words, we don’t go anywhere. In general, we don’t actually draw \(\vec{0}\). At best, one can draw a dark circle at the origin to convey the idea that \(\vec{0}\), when starting at the origin, points to the origin.

    In Section 2.1 we learned about matrix arithmetic operations: matrix addition and scalar multiplication. Let’s investigate how we can “draw” these operations.

    Vector Addition

    Given two vectors \(\vec{x}\) and \(\vec{y}\), how do we draw the vector \(\vec{x}+\vec{y}\)? Let’s look at this in the context of an example, then study the result.

    Example \(\PageIndex{2}\)

    Let

    \[\vec{x}=\left[\begin{array}{c}{1}\\{1}\end{array}\right]\quad\text{and}\quad\vec{y}=\left[\begin{array}{c}{3}\\{1}\end{array}\right] .\nonumber \]

    Sketch \(\vec{x}\), \(\vec{y}\) and \(\vec{x}+\vec{y}\).

    Solution

    A starting point for drawing each vector was not given; by default, we’ll start at the origin. (This is in many ways nice; this means that the vector \(\left[\begin{array}{c}{3}\\{1}\end{array}\right]\) “points” to the point (3,1).) We first compute \(\vec{x}+\vec{y}\):

    \[\vec{x}+\vec{y}=\left[\begin{array}{c}{1}\\{1}\end{array}\right]+\left[\begin{array}{c}{3}\\{1}\end{array}\right]=\left[\begin{array}{c}{4}\\{2}\end{array}\right] \nonumber \]

    Sketching each gives the picture in Figure \(\PageIndex{3}\).

    clipboard_eaa48f2b609ccd2c2adbee8c045e6f55d.png

    Figure \(\PageIndex{3}\): Adding vectors \(\vec{x}\) and \(\vec{y}\) in Example \(\PageIndex{2}\)

    This example is pretty basic; we were given two vectors, told to add them together, then sketch all three vectors. Our job now is to go back and try to see a relationship between the drawings of \(\vec{x}\), \(\vec{y}\) and \(\vec{x}+\vec{y}\). Do you see any?

    Here is one way of interpreting the adding of \(\vec{x}\) to \(\vec{y}\). Regardless of where we start, we draw \(\vec{x}\). Now, from the tip of \(\vec{x}\), draw \(\vec{y}\). The vector \(\vec{x}+\vec{y}\) is the vector found by drawing an arrow from the origin of \(\vec{x}\) to the tip of \(\vec{y}\). Likewise, we could start by drawing \(\vec{y}\). Then, starting from the tip of \(\vec{y}\), we can draw \(\vec{x}\). Finally, draw \(\vec{x}+\vec{y}\) by drawing the vector that starts at the origin of \(\vec{y}\) and ends at the tip of \(\vec{x}\).

    The picture in Figure \(\PageIndex{4}\) illustrates this. The gray vectors demonstrate drawing the second vector from the tip of the first; we draw the vector \(\vec{x}+\vec{y}\) dashed to set it apart from the rest. We also lightly filled the parallelogram whose opposing sides are the vectors \(\vec{x}\) and \(\vec{y}\). This highlights what is known as the Parallelogram Law.

    clipboard_e1d1958604149a8b3fc8d549f92ff05c8.png

    Figure \(\PageIndex{4}\): Adding vectors graphically using the Parallelogram Law

    Key Idea \(\PageIndex{1}\): Parallelogram Law

    To draw the vector \(\vec{x}+\vec{y}\), one can draw the parallelogram with \(\vec{x}\) and \(\vec{y}\) as its sides. The vector that points from the vertex where \(\vec{x}\) and \(\vec{y}\) originate to the vertex where \(\vec{x}\) and \(\vec{y}\) meet is the vector \(\vec{x}+\vec{y}\).

    Knowing all of this allows us to draw the sum of two vectors without knowing specifically what the vectors are, as we demonstrate in the following example.

    Example \(\PageIndex{3}\)

    Consider the vectors \(\vec{x}\) and \(\vec{y}\) as drawn in Figure \(\PageIndex{5}\). Sketch the vector \(\vec{x}+\vec{y}\).

    Solution

    clipboard_eecd6ef94e3229eb963199bd77fa56be5.png

    Figure \(\PageIndex{5}\): Vectors \(\vec{x}\) and \(\vec{y}\) in Example \(\PageIndex{3}\)

    We’ll apply the Parallelogram Law, as given in Key Idea \(\PageIndex{1}\). As before, we draw \(\vec{x}+\vec{y}\) dashed to set it apart. The result is given in Figure \(\PageIndex{6}\).

    clipboard_e7b4dce14ca15d1093ba86c0a43eae6fa.png

    Figure \(\PageIndex{6}\): Vectors \(\vec{x}\), \(\vec{y}\) and \(\vec{x}+\vec{y}\) in Example \(\PageIndex{3}\)

    Scalar Multiplication

    After learning about matrix addition, we learned about scalar multiplication. We apply that concept now to vectors and see how this is represented graphically.

    Example \(\PageIndex{4}\)

    Let

    \[\vec{x}=\left[\begin{array}{c}{1}\\{1}\end{array}\right]\quad\text{and}\quad\vec{y}=\left[\begin{array}{c}{-2}\\{1}\end{array}\right] .\nonumber \]

    Sketch \(\vec{x}\), \(\vec{y}\), \(3\vec{x}\) and \(-1\vec{y}\).

    Solution

    We begin by computing \(3\vec{x}\) and \(-\vec{y}\):

    \[3\vec{x}=\left[\begin{array}{c}{3}\\{3}\end{array}\right]\quad\text{and}\quad -\vec{y}=\left[\begin{array}{c}{2}\\{-1}\end{array}\right] . \nonumber \]

    All four vectors are sketched in Figure \(\PageIndex{7}\).

    clipboard_ee689746c7ebfd8b7f9d3300efe7fa60b.png

    Figure \(\PageIndex{7}\): Vectors \(\vec{x}\), \(\vec{y}\), \(3\vec{x}\) and \(-\vec{y}\) in Example \(\PageIndex{4}\)

    As we often do, let us look at the previous example and see what we can learn from it. We can see that \(\vec{x}\) and \(3\vec{x}\) point in the same direction (they lie on the same line), but \(3\vec{x}\) is just longer than \(\vec{x}\). (In fact, it looks like \(3\vec{x}\) is 3 times longer than \(\vec{x}\). Is it? How do we measure length?)

    We also see that \(\vec{y}\) and \(-\vec{y}\) seem to have the same length and lie on the same line, but point in the opposite direction.

    A vector inherently conveys two pieces of information: length and direction. Multiplying a vector by a positive scalar \(c\) stretches the vectors by a factor of \(c\); multiplying by a negative scalar \(c\) both stretches the vector and makes it point in the opposite direction.

    Knowing this, we can sketch scalar multiples of vectors without knowing specifically what they are, as we do in the following example.

    Example \(\PageIndex{5}\)

    Let vectors \(\vec{x}\) and \(\vec{y}\) be as in Figure \(\PageIndex{8}\). Draw \(3\vec{x}\), \(-2\vec{x}\), and \(\frac{1}{2}\vec{y}\).

    clipboard_e671e2f1985e077c7850ede98bc227fa5.png

    Figure \(\PageIndex{8}\): Vectors \(\vec{x}\) and \(\vec{y}\) in Example \(\PageIndex{5}\)

    Solution

    To draw \(3\vec{x}\), we draw a vector in the same direction as \(\vec{x}\), but 3 times as long. To draw \(-2\vec{x}\), we draw a vector twice as long as \(\vec{x}\) in the opposite direction; to draw \(\frac{1}{2}\vec{y}\), we draw a vector half the length of \(\vec{y}\) in the same direction as \(\vec{y}\). We again use the default of drawing all the vectors starting at the origin. All of this is shown in Figure \(\PageIndex{9}\).

    clipboard_e730529999cba3617d3761532bb74eb57.png

    Figure \(\PageIndex{9}\): Vectors \(\vec{x}\), \(\vec{y}\), \(3\vec{x}\), \(-2x\) and \(\frac{1}{2}\vec{x}\) in Example \(\PageIndex{5}\)

    Vector Subtraction

    The final basic operation to consider between two vectors is that of vector subtraction: given vectors \(\vec{x}\) and \(\vec{y}\), how do we draw \(\vec{x}-\vec{y}\)?

    If we know explicitly what \(\vec{x}\) and \(\vec{y}\) are, we can simply compute what \(\vec{x}-\vec{y}\) is and then draw it. We can also think in terms of vector addition and scalar multiplication: we can add the vectors \(\vec{x}+(-1)\vec{y}\). That is, we can draw \(\vec{x}\) and draw \(-\vec{y}\), then add them as we did in Example \(\PageIndex{3}\). This is especially useful we don’t know explicitly what \(\vec{x}\) and \(\vec{y}\) are.

    Example \(\PageIndex{6}\)

    Let vectors \(\vec{x}\) and \(\vec{y}\) be as in Figure \(\PageIndex{10}\). Draw \(\vec{x}-\vec{y}\).

    clipboard_e81e1a72da6e0dc89897978821f386525.png

    Figure \(\PageIndex{10}\): Vectors \(\vec{x}\) and \(\vec{y}\) in Example \(\PageIndex{6}\)

    Solution

    To draw \(\vec{x}-\vec{y}\), we will first draw \(-\vec{y}\) and then apply the Parallelogram Law to add \(\vec{x}\) to \(-\vec{y}\). See Figure \(\PageIndex{11}\).

    clipboard_ee0a10fa6ce0a35c744ddeabb6e21b383.png

    Figure \(\PageIndex{11}\): Vectors \(\vec{x}\), \(\vec{y}\) and \(\vec{x}-\vec{y}\) in Example \(\PageIndex{6}\)

    In Figure \(\PageIndex{12}\), we redraw Figure \(\PageIndex{11}\) from Example \(\PageIndex{6}\) but remove the gray vectors that tend to add clutter, and we redraw the vector \(\vec{x}-\vec{y}\) dotted so that it starts from the tip of \(\vec{y}\).\(^{3}\) Note that the dotted version of \(\vec{x}-\vec{y}\) points from \(\vec{y}\) to \(\vec{x}\). This is a “shortcut” to drawing \(\vec{x}-\vec{y}\); simply draw the vector that starts at the tip of \(\vec{y}\) and ends at the tip of \(\vec{x}\). This is important so we make it a Key Idea.

    clipboard_eb6e3c041c8055326108469c2a282accb.png

    Figure \(\PageIndex{12}\): Redrawing vector \(\vec{x}-\vec{y}\)

    Key Idea \(\PageIndex{2}\): Vector Subtraction

    To draw the vector \(\vec{x}-\vec{y}\), draw \(\vec{x}\) and \(\vec{y}\) so that they have the same origin. The vector \(\vec{x}-\vec{y}\) is the vector that starts from the tip of \(\vec{y}\) and points to the tip of \(\vec{x}\).

    Let’s practice this once more with a quick example.

    Example \(\PageIndex{7}\)

    Let \(\vec{x}\) and \(\vec{y}\) be as in Figure \(\PageIndex{13}\) (a), Draw \(\vec{x}-\vec{y}\).

    Solution

    We simply apply Key Idea \(\PageIndex{2}\): we draw an arrow from \(\vec{y}\) to \(\vec{x}\). We do so in Figure \(\PageIndex{13}\); \(\vec{x}-\vec{y}\) is dashed.

    clipboard_ebc48839c92cf534a3760eb2cbc44349d.png

    Figure \(\PageIndex{13}\): Vectors \(\vec{x}\), \(\vec{y}\) and \(\vec{x}-\vec{y}\) in Example \(\PageIndex{7}\)

    Vector Length

    When we discussed scalar multiplication, we made reference to a fundamental question: How do we measure the length of a vector? Basic geometry gives us an answer in the two dimensional case that we are dealing with right now, and later we can extend these ideas to higher dimensions.

    Consider Figure \(\PageIndex{14}\). A vector \(\vec{x}\) is drawn in black, and dashed and dotted lines have been drawn to make it the hypotenuse of a right triangle.

    clipboard_e1999d0fbf0f93189bbe3c82df0fbe01f.png

    Figure \(\PageIndex{14}\): Measuring the length of a vector

    It is easy to see that the dashed line has length 4 and the dotted line has length 3. We’ll let \(c\) denote the length of \(\vec{x}\); according to the Pythagorean Theorem, \(4^2+3^2 = c^2\). Thus \(c^2 = 25\) and we quickly deduce that \(c=5\).

    Notice that in our figure, \(\vec{x}\) goes to the right 4 units and then up 3 units. In other words, we can write \[\vec{x}=\left[\begin{array}{c}{4}\\{3}\end{array}\right] . \nonumber \] We learned above that the length of \(\vec{x}\) is \(\sqrt{4^2+3^2}\).\(^{4}\) This hints at a basic calculation that works for all vectors \(\vec{x}\), and we define the length of a vector according to this rule.

    Definition: Vector Length

    Let

    \[\vec{x}=\left[\begin{array}{c}{x_{1}}\\{x_{2}}\end{array}\right] . \nonumber \]

    The length of \(\vec{x}\), denots \(||\vec{x}||\), is

    \[||\vec{x}||=\sqrt{x_{1}^{2}+x_{2}^{2}} . \nonumber \]

    Example \(\PageIndex{8}\)

    Find the length of each of the vectors given below.

    \[\vec{x}_{1}=\left[\begin{array}{c}{1}\\{1}\end{array}\right]\quad\vec{x}_{2}=\left[\begin{array}{c}{2}\\{-3}\end{array}\right]\quad\vec{x}_{3}=\left[\begin{array}{c}{.6}\\{.8}\end{array}\right]\quad\vec{x}_{4}=\left[\begin{array}{c}{3}\\{0}\end{array}\right]\nonumber \]

    Solution

    We apply Definition Vector Length to each vector.
    \[\begin{aligned} ||\vec{x}_{1}|| &= \sqrt{1^2+1^2} = \sqrt{2}.\\ ||\vec{x}_{2}|| &= \sqrt{2^2+(-3)^2} = \sqrt{13}.\\ ||\vec{x}_{3}|| &= \sqrt{.6^2 +.8^2} = \sqrt{.36+.64} = 1.\\ ||\vec{x}_{4}|| &= \sqrt{3^2+0} = 3.\end{aligned} \nonumber \]

    Now that we know how to compute the length of a vector, let’s revisit a statement we made as we explored Examples \(\PageIndex{4}\) and \(\PageIndex{5}\): “Multiplying a vector by a positive scalar \(c\) stretches the vectors by a factor of \(c\) \(\ldots\)” At that time, we did not know how to measure the length of a vector, so our statement was unfounded. In the following example, we will confirm the truth of our previous statement.

    Example \(\PageIndex{9}\)

    Let \(\vec{x}=\left[\begin{array}{c}{2}\\{-1}\end{array}\right]\). Compute \(||\vec{x}||\), \(||3\vec{x}||\), \(||-2\vec{x}||\), and \(||c\vec{x}||\), where \(c\) is a scalar.

    Solution

    We apply Definition Vector Length to each of the vectors.

    \(||\vec{x}|| = \sqrt{4+1} = \sqrt{5}\).

    Before computing the length of \(||3\vec{x}||\), we note that \(3\vec{x} = \left[\begin{array}{c}{6}\\{-3}\end{array}\right]\).

    \(||3\vec{x}|| = \sqrt{36+9} = \sqrt{45} = 3\sqrt{5} = 3||\vec{x}||.\)

    Before computing the length of \(||-2\vec{x}||\), we note that \(-2\vec{x} = \left[\begin{array}{c}{-4}\\{2}\end{array}\right]\).

    \(||-2\vec{x}|| = \sqrt{16+4} = \sqrt{20} = 2\sqrt{5} = 2||\vec{x}||.\)

    Finally, to compute \(||c\vec{x}||\), we note that \(c\vec{x} = \left[\begin{array}{c}{2c}\\{-c}\end{array}\right]\). Thus:

    \(||c\vec{x}|| = \sqrt{(2c)^2 + (-c)^2} = \sqrt{4c^2 + c^2} = \sqrt{5c^2} = |c|\sqrt{5}.\)

    This last line is true because the square root of any number squared is the absolute value of that number (for example, \(\sqrt{(-3)^2} = 3\)).

    The last computation of our example is the most important one. It shows that, in general, multiplying a vector \(\vec{x}\) by a scalar \(c\) stretches \(\vec{x}\) by a factor of \(|c|\) (and the direction will change if \(c\) is negative). This is important so we’ll make it a Theorem.

    Theorem \(\PageIndex{1}\)

    Vector Length and Scalar Multiplication

    Let \(\vec{x}\) be a vector and let c be a scalar. Then the length of \(c\vec{x}\) is

    \[||c\vec{x}||=|c|\cdot ||\vec{x}|| . \nonumber \]

    Matrix - Vector Multiplication

    The last arithmetic operation to consider visualizing is matrix multiplication. Specifically, we want to visualize the result of multiplying a vector by a matrix. In order to multiply a 2D vector by a matrix and get a 2D vector back, our matrix must be a square, \(2\times 2\) matrix.\(^{5}\)

    We’ll start with an example. Given a matrix \(A\) and several vectors, we’ll graph the vectors before and after they’ve been multiplied by \(A\) and see what we learn.

    Example \(\PageIndex{10}\)

    Let \(A\) be a matrix, and \(\vec{x}\), \(\vec{y}\), and \(\vec{z}\) be vectors as given below.

    \[A=\left[\begin{array}{cc}{1}&{4}\\{2}&{3}\end{array}\right],\quad\vec{x}=\left[\begin{array}{c}{1}\\{1}\end{array}\right],\quad\vec{y}=\left[\begin{array}{c}{-1}\\{1}\end{array}\right],\quad\vec{z}=\left[\begin{array}{c}{3}\\{-1}\end{array}\right]\nonumber \]

    Graph \(\vec{x}\), \(\vec{y}\) and \(\vec{z}\), as well as \(A\vec{x}\), \(A\vec{y}\) and \(A\vec{z}\).

    Solution

    clipboard_edcd187efdc2ea575c48d86b38613cd05.png

    Figure \(\PageIndex{15}\): Multiplying vectors by a matrix in Example \(\PageIndex{10}\).

    It is straightforward to compute:

    \[A\vec{x}=\left[\begin{array}{c}{5}\\{5}\end{array}\right],\quad A\vec{y}=\left[\begin{array}{c}{3}\\{1}\end{array}\right],\quad\text{and}\quad A\vec{z}=\left[\begin{array}{c}{-1}\\{3}\end{array}\right]. \nonumber \]

    The vectors are sketched in Figure \(\PageIndex{15}\).

    There are several things to notice. When each vector is multiplied by \(A\), the result is a vector with a different length (in this example, always longer), and in two of the cases (for \(\vec{y}\) and \(\vec{z}\)), the resulting vector points in a different direction.

    This isn’t surprising. In the previous section we learned about matrix multiplication, which is a strange and seemingly unpredictable operation. Would you expect to see some sort of immediately recognizable pattern appear from multiplying a matrix and a vector?\(^{6}\) In fact, the surprising thing from the example is that \(\vec{x}\) and \(A\vec{x}\) point in the same direction! Why does the direction of \(\vec{x}\) not change after multiplication by \(A\)? (We’ll answer this in Section 4.1 when we learn about something called “eigenvectors.”)

    Different matrices act on vectors in different ways.\(^{7}\) Some always increase the length of a vector through multiplication, others always decrease the length, others increase the length of some vectors and decrease the length of others, and others still don’t change the length at all. A similar statement can be made about how matrices affect the direction of vectors through multiplication: some change every vector’s direction, some change “most” vector’s direction but leave some the same, and others still don’t change the direction of any vector.

    How do we set about studying how matrix multiplication affects vectors? We could just create lots of different matrices and lots of different vectors, multiply, then graph, but this would be a lot of work with very little useful result. It would be too hard to find a pattern of behavior in this.\(^{8}\)

    Instead, we’ll begin by using a technique we’ve employed often in the past. We have a “new” operation; let’s explore how it behaves with “old” operations. Specifically, we know how to sketch vector addition. What happens when we throw matrix multiplication into the mix? Let’s try an example.

    Example \(\PageIndex{11}\)

    Let \(A\) be a matrix and \(\vec{x}\) and \(\vec{y}\) be vectors as given below.

    \[A=\left[\begin{array}{cc}{1}&{1}\\{1}&{2}\end{array}\right],\quad\vec{x}=\left[\begin{array}{c}{2}\\{1}\end{array}\right],\quad\vec{y}=\left[\begin{array}{c}{-1}\\{1}\end{array}\right]\nonumber \]

    Sketch \(\vec{x}+\vec{y}\), \(A\vec{x}\), \(A\vec{y}\), and \(A(\vec{x}+\vec{y})\).

    Solution

    It is pretty straightforward to compute:

    \[\vec{x}+\vec{y}=\left[\begin{array}{c}{1}\\{2}\end{array}\right];\quad A\vec{x}=\left[\begin{array}{c}{3}\\{4}\end{array}\right];\quad A\vec{y}=\left[\begin{array}{c}{0}\\{1}\end{array}\right],\quad A(\vec{x}+\vec{y})=\left[\begin{array}{c}{3}\\{5}\end{array}\right] . \nonumber \]

    In Figure \(\PageIndex{16}\), we have graphed the above vectors and have included dashed gray vectors to highlight the additive nature of \(\vec{x}+\vec{y}\) and \(A(\vec{x}+\vec{y})\). Does anything strike you as interesting?

    clipboard_e0bbd180cf319fa467f04b9d9aca53979.png

    Figure \(\PageIndex{16}\): Vector addition and matrix multiplication in Example \(\PageIndex{11}\).

    Let’s not focus on things which don’t matter right now: let’s not focus on how long certain vectors became, nor necessarily how their direction changed. Rather, think about how matrix multiplication interacted with the vector addition.

    In some sense, we started with three vectors, \(\vec{x}\), \(\vec{y}\), and \(\vec{x}+\vec{y}\). This last vector is special; it is the sum of the previous two. Now, multiply all three by \(A\). What happens? We get three new vectors, but the significant thing is this: the last vector is still the sum of the previous two! (We emphasize this by drawing dotted vectors to represent part of the Parallelogram Law.)

    Of course, we knew this already: we already knew that \(A\vec{x}+A\vec{y}=A(\vec{x}+\vec{y})\), for this is just the Distributive Property. However, now we get to see this graphically.

    In Section 5.1 we’ll study in greater depth how matrix multiplication affects vectors and the whole Cartesian plane. For now, we’ll settle for simple practice: given a matrix and some vectors, we’ll multiply and graph. Let’s do one more example.

    Example \(\PageIndex{12}\)

    Let \(A\), \(\vec{x}\), \(\vec{y}\), and \(\vec{z}\) be as given below.

    \[A=\left[\begin{array}{cc}{1}&{-1}\\{1}&{-1}\end{array}\right],\quad\vec{x}=\left[\begin{array}{c}{1}\\{1}\end{array}\right],\quad\vec{y}=\left[\begin{array}{c}{-1}\\{1}\end{array}\right],\quad\vec{z}=\left[\begin{array}{c}{4}\\{1}\end{array}\right]\nonumber \]

    Graph \(\vec{x}\), \(\vec{y}\) and \(\vec{z}\), as well as \(A\vec{x}\), \(A\vec{y}\) and \(A\vec{z}\).

    Solution

    clipboard_e205ba013b99c89c384286243e16512cd.png

    Figure \(\PageIndex{17}\): Multiplying vectors by a matrix in Example \(\PageIndex{12}\).

    It is straightforward to compute: \[A\vec{x}=\left[\begin{array}{c}{0}\\{0}\end{array}\right],\quad A\vec{y}=\left[\begin{array}{c}{-2}\\{-2}\end{array}\right],\quad\text{and}\quad A\vec{z}=\left[\begin{array}{c}{3}\\{3}\end{array}\right]. \nonumber \] The vectors are sketched in Figure \(\PageIndex{17}\).

    These results are interesting. While we won’t explore them in great detail here, notice how \(\vec{x}\) got sent to the zero vector. Notice also that \(A\vec{x}\), \(A\vec{y}\) and \(A\vec{z}\) are all in a line (as well as \(\vec{x}\)!). Why is that? Are \(\vec{x}\), \(\vec{y}\) and \(\vec{z}\) just special vectors, or would any other vector get sent to the same line when multiplied by ?\(^{9}\)

    This section has focused on vectors in two dimensions. Later on in this book, we’ll extend these ideas into three dimensions (3D).

    In the next section we’ll take a new idea (matrix multiplication) and apply it to an old idea (solving systems of linear equations). This will allow us to view an old idea in a new way – and we’ll even get to “visualize” it.

    Footnotes

    [1] To help reduce clutter, in all figures each tick mark represents one unit.

    [2] Vectors are just special types of matrices. The zero vector, \(\vec{0}\), is a special type of zero matrix, \(\mathbf{0}\). It helps to distinguish the two by using different notation.

    [3] Remember that we can draw vectors starting from anywhere.

    [4] Remember that \(\sqrt{4^2+3^2} \neq 4+3\)!

    [5] We can multiply a \(3\times 2\) matrix by a 2D vector and get a 3D vector back, and this gives very interesting results. See Section 5.2.

    [6] This is a rhetorical question; the expected answer is “No.”

    [7] That’s one reason we call them “different.”

    [8] Remember, that’s what mathematicians do. We look for patterns.

    [9] Don’t just sit there, try it out!


    This page titled 2.3: Visualizing Matrix Arithmetic in 2D is shared under a CC BY-NC 3.0 license and was authored, remixed, and/or curated by Gregory Hartman et al. via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.