Matrices and linear functions

Let A be some 2 x 3 matrix, say

A = $\displaystyle \left[\vphantom{ \begin{array}{rrr} 1 & 0 & -1\ 3 & 1 & 2 \end{array} }\right.$$\displaystyle \begin{array}{rrr} 1 & 0 & -1\ 3 & 1 & 2 \end{array}$$\displaystyle \left.\vphantom{ \begin{array}{rrr} 1 & 0 & -1\ 3 & 1 & 2 \end{array} }\right]$.    

What do you get if you multiply A by the vector x = (x, y, z)? Remembering our matrix multiplication, we see that

Ax = $\displaystyle \left[\vphantom{ \begin{array}{rrr} 1 & 0 & -1\ 3 & 1 & 2 \end{array} }\right.$$\displaystyle \begin{array}{rrr} 1 & 0 & -1\ 3 & 1 & 2 \end{array}$$\displaystyle \left.\vphantom{ \begin{array}{rrr} 1 & 0 & -1\ 3 & 1 & 2 \end{array} }\right]$$\displaystyle \left[\vphantom{ \begin{array}{c} x\ y\ z \end{array} }\right.$$\displaystyle \begin{array}{c} x\ y\ z \end{array}$$\displaystyle \left.\vphantom{ \begin{array}{c} x\ y\ z \end{array} }\right]$ = $\displaystyle \left[\vphantom{ \begin{array}{c} x - z\ 3x + y +2z \end{array} }\right.$$\displaystyle \begin{array}{c} x - z\ 3x + y +2z \end{array}$$\displaystyle \left.\vphantom{ \begin{array}{c} x - z\ 3x + y +2z \end{array} }\right]$ = (x - z, 3x + y + 2z).    

If we define a function f(x) = Ax, we have created a function of three variables (x, y, z) whose output is a two-dimensional vector (x - z, 3x + y + 2z). Using our function notation, we can write f : R3$ \to$R2. We have created a vector-valued function of three variables. So, for example, f(1, 2, 3) = (1 - 3, 3 . 1 + 2 - 2 . 3) = (- 2, - 1).

Given any m x n matrix B, we can define a function g : Rn$ \to$Rm (note the order of m and n switched) by g(x) = Bx, where x is an n-dimensional vector. As another example, if

C = $\displaystyle \left[\vphantom{ \begin{array}{rr} 5 & -3\ 1 & 0\ -7 & 4\ 0 & -2 \end{array} }\right.$$\displaystyle \begin{array}{rr} 5 & -3\ 1 & 0\ -7 & 4\ 0 & -2 \end{array}$$\displaystyle \left.\vphantom{ \begin{array}{rr} 5 & -3\ 1 & 0\ -7 & 4\ 0 & -2 \end{array} }\right]$,    

then the function h(y) = Cy, where y = (y1, y2), is h(y) = (5y1 -3y2, y1, -7y1 +4y2, -2y2).

In this way, we can associate with every matrix a function. What about going the other way around? Given some function, say g : Rn$ \to$Rm, can we associate with g(x) some matrix? We can only if g(x) is a special kind of function called a linear function. The function g(x) is linear if each term in g(x) is a number times one of the variables. So, for example, the functions f(x, y) = (2x + y, y/2) and g(x, y, z) = (z, 0, 1.2x) are linear, but none of the following functions are linear: f(x, y) = (x2, y, x),  g(x, y, z) = (y, xyz), or h(x, y, z) = (x + 1, y, z). Note that both functions we obtained from matrices above were linear.

Let's take the function f(x, y) = (2x + y, y, x - 3y), which is a linear function from R2 to R3. The matrix A associated with f will be a 3 x 2 matrix, which we'll write as

A = $\displaystyle \left[\vphantom{ \begin{array}{cc} a_{11} & a_{12}\ a_{21} & a_{22}\ a_{31} & a_{32} \end{array} }\right.$$\displaystyle \begin{array}{cc} a_{11} & a_{12}\ a_{21} & a_{22}\ a_{31} & a_{32} \end{array}$$\displaystyle \left.\vphantom{ \begin{array}{cc} a_{11} & a_{12}\ a_{21} & a_{22}\ a_{31} & a_{32} \end{array} }\right]$.    

We need A to satisfy f(x) = Ax, where x = (x, y).

The easiest way to find A is the following. If we let x = (1, 0), then f (x) = Ax is the first column of A. (Can you see that?) So we know the first column of A is simply

f (1, 0) = (2, 0, 1) = $\displaystyle \left[\vphantom{ \begin{array}{r} 2\ 0\ 1 \end{array} }\right.$$\displaystyle \begin{array}{r} 2\ 0\ 1 \end{array}$$\displaystyle \left.\vphantom{ \begin{array}{r} 2\ 0\ 1 \end{array} }\right]$.    

Similarly, if x = (0, 1), then f (x) = Ax is the second column of A, which is

f (0, 1) = (1, 1, -3) = $\displaystyle \left[\vphantom{ \begin{array}{r} 1\ 1\ -3 \end{array} }\right.$$\displaystyle \begin{array}{r} 1\ 1\ -3 \end{array}$$\displaystyle \left.\vphantom{ \begin{array}{r} 1\ 1\ -3 \end{array} }\right]$.    

Putting these together, we see that the linear function f(x) is associated with the matrix

A = $\displaystyle \left[\vphantom{ \begin{array}{rr} 2 & 1\ 0 & 1\ 1 & -3 \end{array} }\right.$$\displaystyle \begin{array}{rr} 2 & 1\ 0 & 1\ 1 & -3 \end{array}$$\displaystyle \left.\vphantom{ \begin{array}{rr} 2 & 1\ 0 & 1\ 1 & -3 \end{array} }\right]$.    

The important conclusion is that every linear function is associated with a matrix and vice versa. We will sometimes use this correspondence in this course because, as you soon will learn, the multivariable version of a derivative will be a matrix. We can also view the derivative as the linear function associated with that matrix.



Duane Nykamp
nykamp@math.umn.edu
2005-09-01