• No results found

22 Multiplying matrices using dot products

There is a quick way to multiply matrices using dot products

Question 1 Let M =

M is a covector (row) just by looking at dimensions. What is the ith entry of this row? Well, we can only figure that out by applying the map to the basis vectors. ~ej>M ~ei is the Mj,kby performing the operation ~e>jM~bk. This is so important we will label it as a theorem:

Theorem 2 If M is an m × n matrix, ~ej is the standard basis of Rmand ~bk is the standard basis of Rn, then Mj,k= ~e>jM~bk.

Proof The proof is simply that M~bk is by definition the kth column of the matrix, and by our observation above ~e>jM~bk must be the jthrow of that column

vector, which consists of the single number Mi,j 

Question 3 Let M =4 1 −2

3 1 0

 . Solution

Hint: By the above theorem, it will be the entry in the 2ndrow and the 1stcolumn of M

22 Multiplying matrices using dot products

The philosophical import of this theorem is that we can probe the inner structure of any matrix with simple row and column vectors to find out every component of the matrix. What happens when we apply this insight to a product of matrices?

Question 4 Let A =

22 Multiplying matrices using dot products

Theorem 5 Let A and B be composable matrices. Let C = AB. Then Ci,j is the product of the ithrow of A with the jthcolumn of B

Prove this theorem We can prove this by combining the other two theorems in this section. Ci,j = ~ei>C~ej by the second theorem. But C = AB, so we have Ci,j= ~ei>AB~ej. By the first theorem ~ei>A is the ithrow of A, and by our definition of matrix multiplication, B~ej is the jthcolumn of B. So Ci,j is the product of the ithrow of A with the kth column of B.

Now try multiplying some matrices of your choosing using this method. This is likely the definition of matrix multiplication you learned in high school (or the same thing defined by some messy formula with aX

). Do you prefer this method?

Or do you prefer whatever method you came up with on your own earlier? Maybe they are the same!

Another note: it is interesting that we are feeding two vectors ei and ej into the matrix and getting out a number somehow. In week 4 we will learn that we are treading in deep water here: this is the very tip of the iceberg of bilinear forms, which are a kind of 2-tensor.

23 Limits

Limits are the difference between analysis and algebra

Limits are the backbone of calculus. Multivariable calculus is no different. In this section we will deal with limits on an intuitive level.

We will postpone the rigorous -δ analysis to the next section.

Definition 1 Let f : Rn→ Rm and let p ∈ Rn. We say that lim

x→pf (x) = L

for some L ∈ Rmif as x “gets arbitrarily close to ” p, the points f (x) “get arbitrarily close to L”.

Definition 2 A function f : Rn→ Rmis said to be continuous at a point p ∈ Rn if lim

x→pf (x) = f (p)

Most functions defined by formulas are continuous where they are defined. For example, the function f (x, y) = (cos(xy + y2), esin(x)+y + y2) is continuous be-cause each component function is a string of composites of continuous functions.

f (x, y) = (xy, cos(x)/(x+y)) is continuous everywhere it is defined (it is not defined on the line y = −x, because the denominator of the second component function vanishes there). This is basically because all of the functions we have names for like cos(x), sin(x), ex, polynomials, rational functions, are all continuous, so if you can write down a function as a “single formula” it is probably continuous. The prob-lematic points are basically just zeros of denominators, like our example above.

Piecewise defined functions can also be problematic:

Argue intuitively that the function f : R2→ R defined by f(x, y) =

(0 if x < y 1 if x ≥ y is continuous at every point off the line y = x, and is discontinuous at every point on the line y = x For any point p which is not on the line y = x, there is a little neighborhood of p where f is the constant function 0, which is known to be continuous. So f is continuous at p. For any point p on the line y = x, we get a different limit if we approach p along the line y = x (we get 1), versus approaching

23 Limits

If we are confronted with a limit like lim

(x,y)→(0,0)

x2+ xy

x + y , this is actually a little bit interesting. The function is not continuous at 0, because it is not even defined at 0. What is more, the numerator and denominator are both approaching 0, which each ”pull” the limit in opposite directions. (Dividing by smaller and smaller numbers would tend to make the value larger and larger, while multiplying by smaller and smaller numbers has the opposite effect) There are essentially two ways to work with this:

• show that it does not have a limit by finding two different ways of approaching (0, 0) which give different limiting values, or

• show that it does have a limit by rewriting the expression algebraically as a continuous function, and just plug in to get the value of the limit.

Question 4 Consider lim

(x,y)→(0,0)

x2+ xy x + y . Solution

Hint: This limit does exist, because it can be rewritten as a continuous function.

Do you think the limit exists?

(a) Yes X (b) No Solution

Hint: lim

(x,y)→(0,0)

x2+ xy

x + y = lim

(x,y)→(0,0)

x(x + y) (x + y)

Hint: lim

(x,y)→(0,0)

x(x + y)

(x + y) = lim

(x,y)→(0,0)x = 0 lim

(x,y)→(0,0)

x2+ xy x + y =0

Question 5 Consider lim

(x,y)→(3,3)

x2− 9 xy − 3y. Solution

Hint: This limit does exist, because it can be rewritten as a continuous function.

Do you think the limit exists?

(a) Yes X (b) No Solution

Hint: lim

(x,y)→(3,3)

x2− 9

xy − 3y= lim

(x,y)→(3,3)

(x − 3)(x + 3) y(x − 3)

23 Limits

Hint: lim

(x,y)→(3,3)

(x − 3)(x + 3)

y(x − 3) = lim

(x,y)→(3,3)

x + 3

y = 3 + 3 3 = 2

lim

(x,y)→(3,3)

x2− 9 xy − 3y =2

Question 6 Let f : R2→ R2 be defined by f (x, y) = (x2y − 4y x − 2 , xy) Solution

Hint: We can consider the limit component by component

Hint:

lim

(x,y)→(2,2)

x2y − 4y

x − 2 = lim

(x,y)→(2,2)

(x − 2)(x + 2)y x − 2

= lim

(x,y)→(2,2)y(x + 2)

= 2(2 + 2)

= 8

Hint: lim

(x,y)→(2,2)xy = 2(2) = 4, since xy is continuous.

Hint: Format your answer as8 4



Writing your answer as a vertical vector, what is lim

(x,y)→(2,2)f (x, y)?

Question 7 Consider lim

(x,y)→(0,0)

x y Solution

Hint: Think about approaching (0, 0) along the line x = 0 first, and then along the line x = y

23 Limits

(a) Yes (b) No X

The last example showcased how you could show that a limit does not exist by finding two different paths along which you approach different limiting values.

Let’s try another example of that form Question 8 Solution

Hint: On the line y = kx, we have f (x, y) = f (x, kx) = x + kx + x2

x − kx =1 + k + x 1 − k .

Hint: So we have lim

x→0

1 + k + x

1 − k = 1 + k 1 − k

The limit of f : R2→ R defined by f(x, y) =x + y + x2

x − y as (x, y) → (0, 0) along the line y = kx is (1 + k)/(1 − k)

The last two questions may have given you the idea that if a limit does not exist, it must be because you get a different value by approaching along two different lines.

This is not always the case. Consider the function

f (x, y) =

(1 if y = x2 0 if y 6= x2

Through any line containing the origin, f approaches 0 as points get closer and closer to (0, 0), but as points approach (0, 0) along the parabola y = x2, f approaches 1. So the limit lim

(x,y)→(0,0)f (x, y) does not exist, even though the limit along each line does.

Here is a more ”natural” example of such a phenomenon (defined by a single formula, not a piecewise defined function):

f (x, y) = x2y x4+ y2 Along each line y = kx, we have f (x, y) = kx3

x4+ k2x2, so lim

x→0

kx3 x4+ k2x2 = lim

x→0

k

x + k2x−1 = 0. On the other hand, along the parabola y = x2, we have f (x, y) = x4

2x4 = 1

2 where the limit is 1

2. So even though the limit along all lines through the origin is 0, the limit does not exist.

Related documents