HW Review

Problems 1a, and 2 from the homework gave us a look at two interesting things we can do with vectors: Problem 1b gave us an interesting kind of problem: find coefficients $x_1$, $x_2$, $x_3$ that make the following equality hold: $$ x_1\cdot \begin{bmatrix} -1\\ 0\\ 2 \end{bmatrix} + x_2\cdot \begin{bmatrix} 0\\ 3\\ 3 \end{bmatrix} + x_3\cdot \begin{bmatrix} 6\\ 3\\ -9 \end{bmatrix} = \begin{bmatrix} 0\\ 0\\ 0 \end{bmatrix} $$ So we have a "linear combination equation". We could also have written down "linear transformation equations", like: $$ f(\boldsymbol{x}) = \begin{bmatrix} 0\\ 0\\ 0 \end{bmatrix} , \text{ for function } f(\boldsymbol{x}) = \begin{bmatrix} \boldsymbol{w_1}\cdot \boldsymbol{x}\\ \boldsymbol{w_2}\cdot \boldsymbol{x}\\ \boldsymbol{w_3}\cdot \boldsymbol{x} \end{bmatrix} , \text{ where } \begin{array}{l} \boldsymbol{w_1} = [-1\ 0\ \ \ 6\ ]\\ \boldsymbol{w_2} = [\ \ \ 0\ 3\ \ \ 3\ ]\\ \boldsymbol{w_3} = [\ \ \ 2\ 3\ -9] \end{array}. $$

ACTIVITY
We can expand for the "linear combination equation" and the "linear transformation equation" into a system of regular old high school algebra equations. Write down those systems!

In both cases, you should have gotten the exact same thing: $$ \begin{array}{rcrcrcl} -1\cdot x_1 &+&0\cdot x_2 &+& 6\cdot x_3&=0\\ 0\cdot x_1 &+&3\cdot x_2 &+& 3\cdot x_3&=0\\ 2\cdot x_1 &+&3\cdot x_2 &+& -9\cdot x_3&=0 \end{array} $$ This kind of object is a system of linear equations.

Introducing ... the Matrix

So now we have three mathematical objects, and if you look at our examples, you will see that all three revolve around the same two-dimensional table of coefficients: $$ \begin{bmatrix} -1&0&6\\ 0&3&3\\ 2&3&-9 \end{bmatrix} $$ This kind of object is called a matrix (plural, matrices) and by studying matrices we are simultanesly studying linear combinations, linear transformations, systems of linear equations, and much more. It is hard to overstate the ubiquity of matrices in mathematics, science and engineering.

Matrix $M$ of dimension $m\times n$ (meaning $m$ rows and $n$ columns) over ring $R$ is the sequence of values $m_{1,1},\ldots m_{1,n},m_{2,1},\ldots, m_{m,n}$ from $R$. We typically write matrix $M$ as $$ \begin{bmatrix} m_{1,1} & m_{1,2} & \cdots & m_{1,n}\\ m_{2,1} & m_{2,2} & \cdots & m_{2,n}\\ \vdots & \vdots & \ddots & \vdots\\ m_{m,n} & m_{m,2} & \cdots & m_{m,n} \end{bmatrix} $$ By the row vectors of $M$ we mean the $m$ vectors $\boldsymbol{v_1},\ldots,\boldsymbol{v_m}$ where $\boldsymbol{v_i} = \begin{bmatrix}m_{i,1}& m_{i,2}&\ldots& m_{i,n}\end{bmatrix}$.
By the column vectors of $M$ we mean the $n$ vectors $\boldsymbol{w_1},\ldots,\boldsymbol{w_m}$ where $\boldsymbol{w_j} = \begin{bmatrix} m_{1,j}\\ m_{2,j}\\ \vdots\\ m_{m,j} \end{bmatrix}$.

ACTIVITY

  1. Consider the matrix $$ M_1 = \begin{bmatrix} 3 & 0 & 2 & 5\\ -1 & 3 & -2 & 3\\ 4 & 9 & 0 & -5\\ \end{bmatrix} $$
    1. What is the dimension of this matrix?
    2. What are the row vectors of this matrix?
    3. What are the column vectors of his matrix?
  2. Suppose we want to define the meaning of "matrix-vector product" $M\cdot \boldsymbol{x}$, for matrix $M$ and column vector $\boldsymbol{x}$, so that it is equivalent to
    • the linear combination of the column vectors of $M$ where the coefficients are the components of $\boldsymbol{x}$, or
    • the linear transformation defined by row vectors of $M$, applied to the vector $\boldsymbol{x}$.
    ... hopefully you realize that both of these are in fact equivalent.
    1. Looking at $M_1$ in the above example, what dimension must the column vector $\boldsymbol{x}$ have in order to have the linear combination of the columns (or dot products defining the linear transformation) make sense?
    2. In general, if $M$ is an $m\times n$ matrix, in order for the product $M \cdot \boldsymbol{x}$ make sense, what dimension must the column vector $\boldsymbol{x}$ have?
    3. Assuming $M$ and $\boldsymbol{x}$ have compatible dimensions, how should result of the matrix vector product $M \cdot \boldsymbol{x}$ be defined?

Matrix vector product

If $M$ is an $m\times n$ matrix with row vectors $\boldsymbol{r_1},\ldots,\boldsymbol{r_m}$, and $\boldsymbol{x}$ is column vector of dimension $n$, the matrix-vector product $M \cdot \boldsymbol{x}$ is the column vector of dimension $m$ whose $i$th component is $\boldsymbol{r_i}\cdot \boldsymbol{x}$. In other words: $$ M\cdot\boldsymbol{x} = \left[ \begin{array}{c} \boldsymbol{r_1}\cdot\boldsymbol{x}\\ \boldsymbol{r_2}\cdot\boldsymbol{x}\\ \vdots\\ \boldsymbol{r_m}\cdot\boldsymbol{x}\\ \end{array} \right] $$

Just remember: "row times column".

$$ \begin{bmatrix} 3 & 0 & 2 & 5\\ -1 & 3 & -2 & 3\\ 4 & 9 & 0 & -5\\ \end{bmatrix} \cdot \begin{bmatrix} 1\\ -1\\ 2\\ 0 \end{bmatrix} = \begin{bmatrix} \begin{bmatrix}3 & 0 & 2 & 5\end{bmatrix}\cdot\begin{bmatrix}1 & -1 & 2 & 0\end{bmatrix}\\ \begin{bmatrix}-1 & 3 & -2 & 3\end{bmatrix}\cdot\begin{bmatrix}1 & -1 & 2 & 0\end{bmatrix}\\ \begin{bmatrix}4 & 9 & 0 & -5\end{bmatrix}\cdot\begin{bmatrix}1 & -1 & 2 & 0\end{bmatrix}\\ \end{bmatrix} = \begin{bmatrix} 7\\ -8\\ -5 \end{bmatrix} $$

ACTIVITY

  1. Compute the following matrix products: $$ \begin{array}{ccccc} \begin{bmatrix} 4&0&-2\\ 1&-3&4 \end{bmatrix} \cdot \begin{bmatrix} 2\\ -1\\ 1/2 \end{bmatrix} = \ \ \ \ \ &,& \begin{bmatrix} 2&3\\ -1&0\\ 5&2 \end{bmatrix} \cdot \begin{bmatrix} 2\\ 1/2 \end{bmatrix} = \ \ \ \ \ &,& \begin{bmatrix} 3&-2\\ 5&4 \end{bmatrix} \cdot \begin{bmatrix} -7\\ 4 \end{bmatrix} \end{array} = $$
  2. Do the following two multiplications: $$ \begin{array}{cccc} %%%%% \begin{bmatrix} 3&-4\\ 2&5\\ 1&-1 \end{bmatrix} \cdot \begin{bmatrix} 1\\ 0 \end{bmatrix} = \ \ \ \ \ &,& %%%%% \begin{bmatrix} 3&-4\\ 2&5\\ 1&-1 \end{bmatrix} \cdot \begin{bmatrix} 0\\ 1 \end{bmatrix} = %%%%% \end{array} $$
  3. Make a hypothesis: Let $M$ by an $m\times n$ matrix and $\boldsymbol{x}$ be an $n$-dimensional column vector in which the $i$th component is $1$, and all other components are $0$. Then $M\cdot \boldsymbol{x} = $ ....
  4. Find a $2\times 2$ matrix with the property that when you multiply it and any 2-dimensional vector $\boldsymbol{x}$, you get that same $\boldsymbol{x}$ back again. I.e. $$ \begin{bmatrix} ?&?\\ ?&? \end{bmatrix} \cdot \begin{bmatrix} x_1\\ x_2 \end{bmatrix} = \begin{bmatrix} x_1\\ x_2 \end{bmatrix} $$

The unit vectors

In vector space $\mathbb{R}^n$ we define the unit vectors $\boldsymbol{e_1},\ldots,\boldsymbol{e_n}$ as follows: the $j$th component of $\boldsymbol{e_i}$ is 1 if $j=i$ and $0$ otherwise.

From part 3 of the activity, we get the following: for any $m\times n$ matrix $M$, $M\cdot \boldsymbol{e_i} = $ the $i$th column vector of $M$.

The identity matrix

Let's follow on from part 4 of the activity. Consider the equation: $$ M\cdot\boldsymbol{x}=\boldsymbol{x} $$ If $\boldsymbol{x}$ is an $n$-dimensional vector, $M$ must have dimension $n\times n$ (this means it is square), since it has to have $n$ columns for multiplication by $\boldsymbol{x}$ to make sense, and it has to have $n$ rows in order to produce an output vector of dimension $n$. We are looking for the $n\times n$ identitymatrix, $I$, which should have the property that the above equation holds for all $\boldsymbol{x}$. This means, in particular, that $$ I\cdot\boldsymbol{e_i}=\boldsymbol{e_i}. $$ But from the previous section, $I\cdot\boldsymbol{e_i}=$ the $i$th column of $I$. So, the $i$th column of $I$ is $\boldsymbol{e_i}$. This means that the $i$th column of $I$ is 1 at the the $i$th row and zero everywhere else.

So $I$ has the shape we hypothesized in class: 1's along the main diagonal, and zeros everywhere else. For example, the $3\times 3$ identity matrix is :

$$ \begin{bmatrix} 1&0&0\\ 0&1&0\\ 0&0&1 \end{bmatrix} $$


Christopher W Brown