Vectors€¦ · Vectors Math Lecture 2 Nicholas Dwork Vectors A vector is an ordered finite list...

12
Vectors Math Lecture 2 Nicholas Dwork Vectors A vector is an ordered finite list of numbers together with pointwise addition and scalar multiplication. 2 6 6 4 -1.1 0.0 3.6 -7.2 3 7 7 5 Example: (-1.1, 0.0, 3.6, -7.2) Example: 0 All the elements are 0. The length is understood from context.

Transcript of Vectors€¦ · Vectors Math Lecture 2 Nicholas Dwork Vectors A vector is an ordered finite list...

Page 1: Vectors€¦ · Vectors Math Lecture 2 Nicholas Dwork Vectors A vector is an ordered finite list of numbers together with pointwise addition and scalar multiplication.

VectorsMath Lecture 2

Nicholas Dwork

VectorsA vector is an ordered finite list of numbers together with pointwise addition and scalar multiplication.

2

664

�1.10.03.6�7.2

3

775

Example: (�1.1, 0.0, 3.6,�7.2)

Example: 0

All the elements are 0.The length is understood from context.

Page 2: Vectors€¦ · Vectors Math Lecture 2 Nicholas Dwork Vectors A vector is an ordered finite list of numbers together with pointwise addition and scalar multiplication.

Drawing Vectors in 2D

aa =

41

Vector AdditionTwo vectors of the same size can be added together by adding corresponding components.

Example:

Example:

2

4073

3

5+

2

4120

3

5 =

2

4193

3

5

19

��

11

�=

08

Page 3: Vectors€¦ · Vectors Math Lecture 2 Nicholas Dwork Vectors A vector is an ordered finite list of numbers together with pointwise addition and scalar multiplication.

Geometric InterpretationVectors add tip-to-tail.

a

ba+ b

a

b b+ a

Scalar MultiplicationEvery element of the vector is multiplied by thescalar (i.e. number)

Example:

(�2)

2

419�6

3

5 =

2

4�2�1812

3

5

Page 4: Vectors€¦ · Vectors Math Lecture 2 Nicholas Dwork Vectors A vector is an ordered finite list of numbers together with pointwise addition and scalar multiplication.

Geometric Interpretation

Vector is scaled by scalar multiplication.

a1.5 a

Parametric Equation of a Line

Suppose that a is a point on the line and v is a vector parallel to the line. The the line can be represented as

where t is any real number.

av

f(t) = a+ t v

Page 5: Vectors€¦ · Vectors Math Lecture 2 Nicholas Dwork Vectors A vector is an ordered finite list of numbers together with pointwise addition and scalar multiplication.

Length of a VectorThe length of a vector , denoted by , is

a

kak2a

kak2 =q

a21 + a22 + · · ·+ a2n

a1

a2

Dot Product

If and are vectors thena b

a · b = aT b = a1 b1 + a2 b2 + · · ·+ an bn

Page 6: Vectors€¦ · Vectors Math Lecture 2 Nicholas Dwork Vectors A vector is an ordered finite list of numbers together with pointwise addition and scalar multiplication.

Cross ProductIf and are vectors in a b R3

a⇥ b =

2

4a2b3 � a3b2�a1b3 + b1a3a1b2 � b1a2

3

5

Angle Between Two VectorsLet denote the angle between vectors and .a b✓

✓ = arccos

✓aT b

kak2 kbk2

a

b✓

Page 7: Vectors€¦ · Vectors Math Lecture 2 Nicholas Dwork Vectors A vector is an ordered finite list of numbers together with pointwise addition and scalar multiplication.

Perpendicular VectorsTwo vectors and are perpendicular if and only if a b

a · b = 0

a

b

Dot Product Properties

The angle between two vectors a,b is acute if and only if

a · b > 0

a · b < 0

The angle between two vectors a,b is obtuse if and only if

Page 8: Vectors€¦ · Vectors Math Lecture 2 Nicholas Dwork Vectors A vector is an ordered finite list of numbers together with pointwise addition and scalar multiplication.

Cross Product Properties

Define c to be .c = a⇥ b

Then c is perpendicular to a and c is perpendicular to b

c ? a c ? b

Cauchy-Schwarz Inequality

Bounds the magnitude of the inner product between two vectors

|aT b| kak2 kbk2

Page 9: Vectors€¦ · Vectors Math Lecture 2 Nicholas Dwork Vectors A vector is an ordered finite list of numbers together with pointwise addition and scalar multiplication.

Linear Combination

�1,�2, . . . ,�n

Suppose are vectors of the same size.a1, a2, . . . , an

A linear combination of these vectors is an expressionof the form

�1 a1 + �2 a2 + · · ·+ �n an

where are numbers.

Linearly Independent

a1, a2, . . . , anA set of vectors is Linearly Independent means the only solution to

c1 a1 + c2 a2 + · · ·+ cn an = 0

c1 = c2 = · · · = cn = 0is

Page 10: Vectors€¦ · Vectors Math Lecture 2 Nicholas Dwork Vectors A vector is an ordered finite list of numbers together with pointwise addition and scalar multiplication.

Span

Suppose are vectors of the same size.

The span of is the set of all linear combinations of the vectors in the set.

a1, a2, . . . , an

{a1, a2, . . . , an}

L2 NormThe L2 norm of a vector , denoted by , is

a

kak2a

kak2 =q

a21 + a22 + · · ·+ a2n

a1

a2

Page 11: Vectors€¦ · Vectors Math Lecture 2 Nicholas Dwork Vectors A vector is an ordered finite list of numbers together with pointwise addition and scalar multiplication.

Metric of Similarity - L2 Norm

If the L2 norm = 0, the vectors are identical

ka� bk2

a

b

a� b

a

ba� b

Metric of Similarity -Pearson Correlation Coefficient

a

ba� b

⇢ =aT b

kak2 kbk2

a

b

a� b

Vectors are considered identical

Page 12: Vectors€¦ · Vectors Math Lecture 2 Nicholas Dwork Vectors A vector is an ordered finite list of numbers together with pointwise addition and scalar multiplication.

Vector Projectiona

b✓⌫

⌫ is called the projection of vector onto .a b

⌫ = projba =

aT b

kbk22b