You are on page 1of 8

Vectors

We can view in two different ways, geometrically and algebraically


Geometric View
A vector is defined as having a magnitude and a direction. We represent it by an arrow in the
plane or in space. The lenght of the arrow is the vector´s magnitude and the direction of the
arrow is the vector´s direction. In this way, two arrows with the same magnitude and direction
represent the same vector.

The vector between two points will be denoted by P Q. We call P the initial point and Q the
terminal point of P Q. The magnitude of the vector A will be denoted k A k. Magnitude will
also be called length or norm.

Algebraic View
As is conventional, we label the origin 0. In the plane 0 = (0, 0) and in the space 0 = (0, 0, 0).
In the x-y plane if we place the tail of A at the origin, it´s head will be at the point with
coordinates, say (a1 , a2 ). In this way, the coordinates of the head determine the vector A. when
we draw A from the origin we will refer to it as an origin vector. Using the coordinates we
write:
A = (a1 , a2 )

The vectors i and j used in the figure above have coordinates i =< 1, 0 >, j =< 0, 1 >
Notation and Terminology
(a1 , a2 ) indicates a point in the plane.

< a1 , a2 >= a1 i + a2 j This is equal to the vector drawn from the origin to the point
(a1 , a2 )

For A = a1 i + a2 j, a1 and a2 are called the i and j camponents of A

P = 0P is the vector from the origin to P

A real numbers were an scalar, you can use it to scale a vector


Vector Algebra Using Coordinates
For the vectors A = a1 i + a2 j and B = b1 i + b2 j we have the following algebraics rule:

Magnitude:k A k= a1 2 + a2 2

Addition:A+B = (a1 +b1 )i+(a2 +b2 )j that is < a1 , a2 > + < b1 +b2 >=< a1 +b1 , a2 +b2 >

Substraction:A − B = (a1 − b1 )i + (a2 − b2 )j that is < a1 , a2 > − < b1 − b2 >=<


a1 − b1 , a2 − b2 >

1
Vectors in three Dimensions
we represent a three dimensional vectors as an arrow in space. Using coordinates we need three
numbers to represent a vector
A =< a1 , a2 , a3 > √
Magnitude:k A k= a1 2 + a2 2 + a3 2
Dot Product:
Def:

− →
− P
A B = ai bi = a1 b1 + a2 b2 + ......

− → −
A B =k A kk B k cosθ

Function of 1 Variable

f (x) = sin(x)

Function of 2 Variables

Given (x, y) → get a number f (x, y)


Examples:

f (x, y) = x2 + y 2

f (x, y) = yx only defined if xy ≥ 0
1
f (x, y) = only if x + y 6= 0
x+y
hhh

Partial Derivatives
df f (x + ∆x) − f (x)
Function of 1 variable f (x) ⇒ f 0 (x) = = lı́m∆x→0
dx ∆x
Question: do the same for f (x, y)?

∂f f (x0 + ∆x, y0 ) − f (x0 , y0 )


(x0 , y0 ) = lı́m∆x→0
∂x ∆x
∂f f (x0 , y0 + ∆y) − f (x0 , y0 )
(x0 , y0 ) = lı́m∆y→0
∂y ∆y
∂f
How to Compute ???? Treat y as constant, x as variable
∂x
Example:

f (x, y) = x3 y + y 2
∂f ∂f
⇒ = 3x2 y ⇒ = x3 + 2y
∂x ∂y

2
f (x, y) = xy 2 + x2 y
⇒ fx = y 2 + 2xy ⇒ fy = 2xy + x2

Compute the second partial derivatives fxx , fxy , fyx


⇒ fxx = 2y ⇒ fxy = 2y + 2x ⇒ fyx = 2y + 2x

Approximation formula

If we change: x → x + ∆x
y → y + ∆y
z = f (x, y) then ∆z = fx ∆x + fy ∆y

Justify this formula tangent plane to z = f (x, y)?

We know fx , fy are slopes of 2 tangent lines,


∂f
if (x0 , y0 ) = a
∂x
(
z = z0 + a(x − x0 )
L1 =
y = y0
∂f
if (x0 , y0 ) = b
∂y
(
z = z0 + b(y − y0 )
L2 =
x = x0
L1 , L2 are both tangent to the graph z = f (x, y). Together they determine a plane z =
z0 + a(x − x0 ) + b(y − yo )
Approx formula says graph of f is close to it’s tangent plane

Application Of Partial Derivatives

Optimization Problems
Find min/max of a function f (x, y)
At a local min or max =⇒ fx = 0 and fy = 0 ⇔ tangent plane to the graph z = f (x, y) is
horizontal!!
Def:(x0 , yo ) is a critical point of f if fx (x0 , y0 ) = 0 and fy (x0 , y0 ) = 0
Example:

f (x, y) = x2 − 2xy + 3y 2 + 2x − 2y
(
fx = 2x − 2y + 2 = 0
⇒ 4y = 0 ⇒ y = 0 =⇒ x = −1
fy = −2x + 6y − 2 = 0
1 critical point (x, y) = (−1, 0)

Posibilities:

local min

local max

3
saddle point
(complete de square) f (x, y) = (x − y)2 + 2y 2 + 2x − 2y
f (x, y) = ((x + y) + 1)2 + 2y 2 > −1 so f (−1, 0) minimum

Least-Squares-Interpolation

Given experimental data (x1 , y1 ),(x2 , y2 ),....., (xi , yi ),....,(xn , yn ). Find the ”best fit”line
y = ax + b.
Find ”best”(minimizing total square deviation) a and b
Pn point yi − (a xi +2b).
Deviation for each data
Minimize D(a, b) = i=1 (yi − (a xi + b))
Want solve:
n
∂D X
= 2(yi − (a xi − b))(−xi ) = 0
∂a i=1
n
∂D X
= 2(yi − (a xi − b))(−1) = 0
∂b i=1
(P (P
n 2
( x2i ) a + ( xi ) b = xi yi
P P
(x
i=1 i a + x i b − x i y i ) = 0
⇒ Pn ⇒ P P
i=1 (xi a + b − yi ) = 0 ( x i ) a + n b = yi

2x2 linear system! (solve for (a,b))

Use least squares to fit a line to the following data: (0,1), (2,1), (3,4)

We find the line that minimize the area of the sum those three squares!!!
( P
a x2i + b xi =
P P
xi yi
P P (F ormula)
a xi + b n = y i
P P P 2 P
xi = 5; yi = 6; xi = 13; xi yi = 14
(
13a + 5b = 14 6 4
⇒ ⇒ a = =⇒ b =
5a + 3b = 6 7 7
6 4
Finally, the line will be: y = x +
7 7
Recall: Critical points of f (x, y) where fx = 0 and fy = 0
Question: How do we decide between:
local min?

4
local max?

saddle point?

Question: How do we find global min/max (these occur either at a critical point or an boun-
dary at infinity)

Second Derivative Test

First consider W = ax2 + bxy +cy 2 , example 2 2 2


 W = x + 2xy + 3y ⇒ W = (x + y) + 2y
2

b
In general, if a 6= 0 =⇒ W = a x2 + xy + cy 2
a 
2
b2 2
  
2 b b 2 2
⇒ W = a x + xy + 2 y + cy − a y
a  4a 4a2
b2
  
b
⇒W =a x+ y + c− y2
2a 4a !
 2
1 b
⇒W = 4a2 x + y + (4ac − b2 )y 2
4a 2a
We have 3 cases:

1. 4ac − b2 < 0 =⇒ Saddle Point


One term > 0, the other < 0

2. 4ac − b2 = 0 =⇒ Degenerated Critical Point

3. 4ac − b2 > 0 =⇒ We have a min/max

if a > 0 ⇒ minimun
if a < 0 ⇒ maximun

Example:
b2 − 4ac quadratic formula? " #
 2  
x x
W = ax2 + bxy + cy 2 −→ y 2 a +b +c
y y
⇒ y 2 ≥ 0 always, if b2 − 4ac > 0 then this take + and - values

⇒ W takes positive and negative values


⇒ Saddle.

In general look at second derivatives

∂ 2f ∂ 2f ∂ 2f ∂ 2f
= fxx = fyy = fyx = fxy
∂x2 ∂y 2 ∂y∂x ∂x∂y

5
Second Derivative Test

At a critical point (x0 , y0 ) of f


Let A = fxx (x0 , y0 ), B = fxy (x0 , y0 ), C = fyy (x0 , y0 )
We have the following cases:

AC − B 2 > 0 and A > 0, Local Minimun

AC − B 2 > 0 and A < 0, Local Maximun

AC − B 2 < 0 Saddle

AC − B 2 = 0 Can´t Conclude

Example:
1
f (x, y) = x + y + ; x, y > 0
xy

1

f x = 1 − 2 = 0
( (
x2 y = 1

xy x=1
1 ⇒ ⇒
f y = 1 −
 =0 xy 2 = 1 y=1
xy 2

Only one critical point (1, 1)

2 1 2
fxx = ⇒A=2 fxy = ⇒B=1 fyy = ⇒C=2
x3 y x2 y 2 xy 3

⇒ AC − B 2 = (2)(2) − (1)2 = 3 > 0; A > 0 we have a local min.

Find and classify the critical points of the function W = x3 − 3xy + y 3 Critical Points:
( ( ( (
Wx = 3x2 − 3y = 0 x2 − y = 0 y = x2 (0, 0)
⇒ ⇒ ⇒
Wy = −3x + 3y 2 = 0 −x + y 2 = 0 x(−1 + x3 ) = 0 (1, 1)

Wxx = 6x ⇒ A Wxy = −3 = B fyy = 6y = C


Study AC − B 2 at critical points
*At (1, 1) A=6; B=-3; C=6 ⇒ AC − B 2 = 27 > 0; A > 0 finally (1, 1) minimum
*At (0, 0) A=0; B=-3; C=0 ⇒ AC − B 2 = −9 < 0; finally (0, 0) is a Saddle Point

A cardboard box of volume 3 has front, back of single thickness, sides of double thickness,
bottom of triple thickness and no top. What dimensions use the least amout of cardboard?

3
Volume: xyz = 3 ⇒ z =
xy

6
⇒ 3xy + 4yz + 2xz (Want
 tominimize)

3 3 12 6
⇒ V = 3xy + 4y + 2x ⇒ V = 3xy + + for x > 0 and y > 0
xy xy x y
Critical Points


12 4
 V
 x = 3y − = 0

 y = (
x2
 
x2  x=2
⇒  2 2 ⇒
6 x y=1
Vy = 3x − 2 = 0
 
3x − 6 =0
 

y 4
Only critial point is (2, 1), in this case we use f (2, 1) = 6 + 6 + 6 = 18

We use the second derivative test to find the LOCAL minimun or maximun of the fun-
ction, isn’t enough for global min/max

More tools to study functions

Differentials
Implicit Differentiation y = f (x) ⇒ dy = f 0 (x)dx

Example:

y = sin−1 (x)
⇒ x = sin(y)
dy 1 1
⇒ dx = cos(y)dy ⇒ = =√
dx cos(y) 1 − x2
cos2 (y) + sen2 (y) = 1
p
cos(y) = 1 − sen2 (y)
Remember: q
cos(y) = 1 − (sen(sen−1 (x)))2

cos(y) = 1 − x2

Total Differential
∂f ∂f ∂f
Let f = f (x, y, z) ⇒ df = fx dx + fy dy + fz dz or df = dx + dy + dz
∂x ∂y ∂z
Important df is NOT ∆f

We can do:

Encode how changes in x,y,z affect f

Place holder for small variations ∆x ∆y ∆z to get approx formula ∆f ' fx ∆x + fy ∆y +


fz ∆z divide by something like dt to get a rate of change:
df dx dy dz
= fx + fy + fz (Chain Rule)
dt dt dt dt
Why is this valid???

1st attempt: df = fx dx + fy dy + fz dz
dx = x0 (t)dt; dy = y 0 (t)dt; dz = z 0 (t)dt

7
⇒ df = fx x0 (t)dt + fy y 0 (t)dt + fz z 0 (t)dt
df dx dy dz
⇒ = fx + fy + fz
dt dt dt dt
Examples:

1. w = x2 y + z; x = t; y = et ; z = sin(t)
dw dx dy dz
*Chain Rule: = 2xy + x2 + 1
dt dt dt dt
= 2tet (1) + t2 (et ) + cos(t)

= 2tet + t2 et + cos(t)
*Substitute: w = x2 y + z
⇒ w(t) = t2 et + sin(t)
dw
⇒ = 2tet + t2 et + cos(t)
dt
2. Find the total differential of w = x3 yz + xy + z + 3 at (1, 2, 3)
dw = wx dx + wy dy + wz dz
dw = (3x2 yz + y)dx + (x3 z + x)dy + (x3 y + 1)dz
dw = (18 + 2)dx + (3 + 1)dy + (2 + 1)dz
dw = 20dx + 4dy + 3dz
dw
3. Suppose w = x3 yz + xy + z + 3 and x = 3cos(t); y = 3sin(t); z = 2t Compute
dt
and evaluate it at t = π/2
dw dx dy dz
= wx + wy + wz
dt dt dt dt
= (3x2 yz + y)(−3sin(t)) + (x3 z + x)(3cos(t)) + (x3 y + 1)(2)
= 3(−3) + 3(0) + 1(2) = −1

rhs = F × (∇ × G) + (F · ∇)G + G × (∇ × F ) + (G · ∇)F (1)


ijk l m j i ijk l m j i
= ε Fj εklm ∂ G + Fj ∂ G + ε Gj εklm ∂ F + Gj ∂ F (2)
kij l m j i kij l m j i
= ε εklm Fj ∂ G + Fj ∂ G + ε εklm Gj ∂ F + Gj ∂ F (3)
i j i j
= (δli δm
j
− δm δl )Fj ∂ l Gm + Fj ∂ j Gi + (δli δm
j
− δm δl )Gj ∂ l F m + Gj ∂ j F i (4)
= Fj ∂ i Gj + Gj ∂ i F i (5)
i j
= ∂ (Fj G ) (6)
= ∇(F · G) = lhs (7)

You might also like