Matrices and linear functions

Let A be some 2 × 3 matrix, say

A = [           ]
  1  0  - 1
  3  1    2.
What do you get if you multiply A by the vector x = (x,y,z)? Remembering our matrix multiplication, we see that
Ax = [           ]
  1  0  - 1
  3  1    2⌊    ⌋
   x
⌈  y ⌉
   z = [             ]
     x - z
  3x + y + 2z = (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 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×n matrix B, we can define a function g : Rn 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 = ⌊          ⌋
     5  - 3
|    1   0 |
|⌈  - 7   4 |⌉

     0  - 2,
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 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 × 2 matrix, which we’ll write as

A = ⌊          ⌋
   a11  a12
⌈  a21  a22⌉
   a31  a32.
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) = ⌊ 2  ⌋
⌈    ⌉
  0
  1.

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

f(0, 1) = (1, 1,-3) = ⌊   1 ⌋
⌈     ⌉
    1
  - 3.

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

A = ⌊  2   1  ⌋
⌈         ⌉
   0   1
   1  - 3.

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.