Lecture II: Vector and Multivariate Calculus

24
Lecture II: Vector and Multivariate Calculus

Transcript of Lecture II: Vector and Multivariate Calculus

Page 1: Lecture II: Vector and Multivariate Calculus

Lecture II: Vector and Multivariate Calculus

Page 2: Lecture II: Vector and Multivariate Calculus

Dot Product• "⃗, $ ∈ ℝ', "⃗ ( $ = ∑+,-' "+ ( $+ ∈ ℝ.• "⃗ ( $ = "⃗ $ cos 1 .• 1 convex angle between the vectors.

• Squared norm of vector: "⃗ 3 = "⃗ ( "⃗.• Alternative notation: "⃗ ( $ = "⃗, $• Matrix multiplication 4 = 5 ( 6ó 7+8 = 5+,., 6.,8• Note: "⃗, "⃗ is always non-negative.• "⃗, $ - measure similarity (angle)• "⃗, "⃗ - measures length.

2

Page 3: Lecture II: Vector and Multivariate Calculus

Dot Product• A geometric interpretation: the part of "⃗ which is parallel to a unit

vector in the direction of #.• And vice versa!

• Projected vector: "∥ = &'(( #.

• The part of # orthogonal to "⃗ has no effect!

3

Page 4: Lecture II: Vector and Multivariate Calculus

Linear Transformations

• Matrix representation: ! = #$, y ∈ ℝ), $ ∈ ℝ*,# ∈ ℝ)×*• A stack of dot products:

! =#,,., $⋮

#*,., $• Canonical axis system: (1,0,0,0, … ) etc.• When 4 = 5, and the matrix is full-rank, it is a change of coordinates.• Geometric intuition: representing $ with the rows of #, instead of the

canonical axis system.

4

Page 5: Lecture II: Vector and Multivariate Calculus

Special Linear Transformations

• Rotation matrix in ℝ": R = %&'( −'*+('*+( %&'( .

• What you learned: rotates a point , = (., 0) by angle ( in CCW direction.• Alternative interpretation:• , is currently represented in the canonical representation.• 2, is the representation of , in the basis %&'(,−'*+( and '*+(, %&'( .

• Watch chalkboard!

5

Page 6: Lecture II: Vector and Multivariate Calculus

Cross Product

• Typically defined only for ℝ".

• %⃗×' = %)'* − %*'), '-%* − '*%-, %-') − %) ∈ ℝ".

• Or more generally:

%⃗×' =%- %) %*'- ') '*/0 /1 3̂

6

Page 7: Lecture II: Vector and Multivariate Calculus

Cross Product

• The result vector is orthogonal to both vectors.• Direction: Right-hand rule.• Normal to the plane spanned by both vectors.

• Magnitude: "⃗×$ = "⃗ $ sin ).• Parallel vectors ó cross product zero.

• The part of $ parallel to "⃗ has no effect on the cross product!• Geometric interpretation: axis of shortest rotation between "⃗ and $.

$ = R+×,())"⃗• Another geometric interpretation: "⃗×$ = /0+1+2232451+6.

7

Page 8: Lecture II: Vector and Multivariate Calculus

Symmetric Bilinear Maps• Alsodenotedas“2-tensors”.• Take two vectors into a scalar.

• 1:ℝ4×ℝ4 → ℝ, 1 7, :⃗ = <.• Symmetry: 1 7, :⃗ = 1 :⃗, 7• Linearity: 1 =7 + ?@, :⃗ = =1 7, :⃗ + ?1 @, :⃗ .• The same for :⃗ for symmetry.

• Can be represented by symmetric A×A matrices: c = 7C1:⃗.

8

Page 9: Lecture II: Vector and Multivariate Calculus

Metric

• ! is positive definite if for every ", ! ", " > 0.• Similarly, negative-definite (< 0), positive semidefinite (≥ 0).

• Interpretation:• ! is a generalized dot product, or a metric.• The original dot product: simply ! = *+,+.• It’s only a true metric (=non-negative) if indeed ! is PSD.

• Often notated .⃗, / 0.• Then, .⃗, .⃗ 0 is “the squared length of .⃗ in the metric of !”.

9

Page 10: Lecture II: Vector and Multivariate Calculus

Functions of Several Variables• A single function of several variables:

!:ℝ$ → ℝ, ! '(, '),⋯ , '$ = ,.• Partial derivative vector, or gradient, is a vector:

-! = .,.'(

,⋯ , .,.'$• In the direction of steepest ascent.

10

Page 11: Lecture II: Vector and Multivariate Calculus

Multi-Valued Functions• A vector-valued function of several variables:

!:ℝ$ → ℝ&, ! (), (*,⋯ , ($ = -), -*,⋯ , -& .

• Can be viewed as a change of coordinates, or a mapping.• Recall: Linear functions óℝ&×$ matrices.

• The derivatives form a matrix, denoted as the Jacobian:

/! = 01 =

2-)2()

⋮ 2-)2($

⋯ ⋯2-$2()

⋮ 2-$2($

https://www.math.duke.edu/education/ccp/materials/mvcalc/parasurfs/para1.html11

Page 12: Lecture II: Vector and Multivariate Calculus

Jacobian Measures Deformation• Consider two points !, ! + Δ!, where Δ! is very small.• Taylor series:

% ! + Δ! ≈ % ! + '(Δ!

• 1st-order linear approximation.

• Original infinitesimal squared length: Δ!, Δ! .• Target length after map:

% ! + Δ! − % ! , % ! + Δ! − % ! ≈'(Δ!, '(Δ! = Δ!+'(+ , '(Δ! = Δ!, Δ! -

Where . = '(+ , '( , a symmetric bilinear form!• Interpretation: '( encodes the change of lengths, or deformation.

%:ℝ1 → ℝ3, % 45, 46,⋯ , 41 = 85, 86,⋯ , 83

12

Page 13: Lecture II: Vector and Multivariate Calculus

Directional Derivative

• The change in function ! in the (unit) direction "#:

$%! = $! , #

• Formally: a map $%:ℝ) → ℝ between direction "# and scalar $! , #• Biggest change: along the gradient.• Smallest change: along the level set.

13

Page 14: Lecture II: Vector and Multivariate Calculus

Vector Fields in 3D

• A vector-valued function assigning a vector to each point in space: !:ℝ$ → ℝ$, ! (⃗ = *⃗.• Physics: velocity fields, force fields, advection, etc.• Special vector fields:• Constant• Rotational• Gradient fields of scalar functions: *⃗ = +,.

http://vis.cs.brown.edu/results/images/Laidlaw-2001-QCE.011.html

14

Page 15: Lecture II: Vector and Multivariate Calculus

Integration over a Curve

• Given a curve "⃗ # = % # , ' # , ((#) , # ∈ [#-, #.].• And a vector field 0⃗(%, ', ()• The integration of the field on the curve is defined as:

120⃗ 3 4"⃗ = 1

56

570⃗ 3 4%

4# ,4'4# ,

4(4# 4#

• Interpretation: the “work done“ by 0⃗ along "⃗.• Geometric description: summing dot products of vector 0⃗ and infinitesimal

curve segments 4"⃗.

15

Page 16: Lecture II: Vector and Multivariate Calculus

Conservative Vector Fields

• A vector field "⃗ is conservative if there is a scalar function # so that for every curve $⃗ % , % ∈ [%), %*]:

,-"⃗ . /$⃗ = # %* − # %)

• Equivalently: if "⃗ = 2#.• The integral is then path independent.

16

Page 17: Lecture II: Vector and Multivariate Calculus

Conservative Vector Fields

• Physical interpretation: the vector field "⃗ is the result of a potential #.• Example: the work (potential energy) $ by gravity force %⃗ = −($ is

only dependent of the height gained\lost.• Question: What the scalar potential $ for a gravity field?

• Corollary: the integral of a conservative vector field over a closed curve is zero!

17

Page 18: Lecture II: Vector and Multivariate Calculus

Gradients and Potential Energy

• Potential energy is a model that describes the potential for acceleration.• An object with potential energy ! is operated upon with force −∇!.• Why negative?

• Example: spring energy: ! = % & − &' (, force: F = −∇! = −% & − &'

18

Page 19: Lecture II: Vector and Multivariate Calculus

The Curl (Rotor) Operator• Definition: !×$⃗ = ⁄' '( , *' '+ , ⁄' ', ×$⃗.• Produces a vector field from a vector field.• Geometric intuition: !×$⃗ encodes local rotation (vorticity) that the

vector field (as a force) induces locally on the point.• Integral definition:

!×$⃗ - ./ = lim3→517 8

9$⃗ - :;⃗

• ; : infinitesemal curve around the point• 7 : area it encompasses.• ./ : rotation axis around which we measure rotation.

http://www.chabotcollege.edu/faculty/shildreth/physics/gifs/curl.gif

19

Page 20: Lecture II: Vector and Multivariate Calculus

Irrotational Fields• Fields where !×$⃗ = 0.• Also denoted Curl-free.

• Conservative fields è irrotational.• as for every scalar ':

!×!' = 0• It is evident from the integral definition: lim

+→-.+ ∮0 $⃗ 1 23⃗.

• Is irrotational è Conservative fields also correct?• Only for simply-connected domains!

20

Page 21: Lecture II: Vector and Multivariate Calculus

Divergence• Definition: ! " $⃗ = ⁄' '( , *' '+ , ⁄' ', " $⃗.• Produces a scalar value from a vector field.• Geometric intuition:! " $⃗ encodes local change in density induced by

vector field as a flux.• Integral definition:

! " $⃗ = lim0→ 2

14 5

6(0)$⃗ " 9: ;<

• <(4) is the surface of an infinitesimal volume around the point.• 9: is the outward local normal.• Divergence-free fields (! " $⃗ = 0) are called solenoidal.

http://magician.ucsd.edu/essentials/WebBookse8.html

21

Page 22: Lecture II: Vector and Multivariate Calculus

Laplacian• The divergence of the gradient of a scalar field:

∆" = $%" = $ & $" .• Produces a scalar value from a scalar field.• Geometric intuition: Measuring how much a function is diffused or

similar to the average of its surrounding.• Found in heat and wave equations.• Used extensively in signal processing, e.g. for denoising.

22

Page 23: Lecture II: Vector and Multivariate Calculus

Stokes Theorem

• A more general form of the idea of “conservative fields”• The modern definition:

!"#$ = !

&"$

• Geometric interpretation: Integrating the differential of a field inside a domain ó integrating the field on the boundary.• Colloquial definition: the change inside is exactly the sum of “ingoing”

and “outgoing” through the boundary.

27

Page 24: Lecture II: Vector and Multivariate Calculus

Stokes Theorem

• Generalizes many classical results.• Integrating along a curve: ∫" #$ % &(⃗ = $ *+ − $ *- .

• Special case: Fundamental theory of calculus: ∫./.0 12 3 &3 = 1 3+ − 1(3-).

• Kelvin-Stokes Theorem:

∮78 9⃗ % &(⃗ = ∬8 #×9⃗ &<.• Divergence theorem:

=>

# % 9⃗ &? =@7>

9⃗ % AB &<• …and many similar more.

28