CM2202: Scientific Computing and Multimedia Applications Lab Class Week 5. School of Computer Science & Informatics

Size: px
Start display at page:

Download "CM2202: Scientific Computing and Multimedia Applications Lab Class Week 5. School of Computer Science & Informatics"

Transcription

1 CM2202: Scientific Computing and Multimedia Applications Lab Class Week 5 School of Computer Science & Informatics

2 Vector operators Definition (Vector Addition, Subtraction and Scalar Multiplication in R n ) Let v and w be two vectors in R n and k a real number. The following rules are well-defined: v + w = (v 1 + w 1, v 2 + w 2,..., v n + w n ). v w = (v 1 w 1, v 2 w 2,..., v n w n ) kv = (kv 1, kv 2,..., kv n ). These rules coincide with the geometrical interpretation for two-dimensional vectors (see previous definitions). 2 / 24

3 Vector Addition, Subtraction and Scalar Multiplication in MATLAB MATLAB directly supports vector addition, subtraction and scalar multiplication: >> v=[1 2 5]; >> w=[3-1 1]; >> v+w ans = >> v-w ans = >> 3 * v ans = >> w*(-1) ans = / 24

4 Scalar product Definition (Scalar product) Given two vectors v and w in R n with components (v 1, v 2,..., v n ) and (w 1, w 2,..., w n ). We define the scalar product (or (standard) inner product, dot product) of v and w as v.w or v, w = n v i w i i=1 Note what the scalar product does: It takes two vectors and assigns them a real number. Problem (Scalar product) Work out the scalar product of vectors v = (1, 2) and w = (2, 3) Note the notations v.w and v, w are equivalent. We use the v.w notation. 4 / 24

5 Scalar product using MATLAB MATLAB provides a vector function dot that computes the dot product of two vectors (of any, identical dimension). >> v = [3 2-1] >> w = [2-1 1] >> dot(v, w) ans = 3 >> sum(v.*w) ans = 3 dot(v, w) is equivalent to sum(v.*w) note v.*w is an array multiplication that returns a vector of the same size. 5 / 24

6 Properties of scalar products Theorem (Cauchy-Schwarz inequality) Let v and w be vectors in R n Then they satisfy the Cauchy-Schwarz inequality v.w v w. Theorem (Angle Between Two Vectors) If n = 2, 3 we even have the relation v.w = v w cos(θ) We call θ the angle between v and w. 6 / 24

7 Euclidean norm of a vector Definition (Euclidean norm of a vector) For a vector v R n we define its norm as v = v.v This norm is called the Euclidean norm of the vector v. The Euclidean norm of a vector coincides with the length of the vector in R 2 and R 3. v2 (v 1, v 2) y v v v1 By Pythagoras Theorem, v = x v v 2 2 = v.v 7 / 24

8 Euclidean norm of a vector in MATLAB The default behaviour of MATLAB function norm for a given vector input is to return the Euclidean norm (also called 2-norm): >> v = [3 4] >> norm(v) ans = 5 >> sqrt(dot(v, v)) ans = 5 8 / 24

9 The Vector Cross Product Besides the scalar product that maps two vectors from R n to R we also need a product that maps two vectors from R n to a vector in R n. Definition (The vector cross product in R 2 ) We define the vector cross product of v, w R 2 as a mapping : R 2 R 2 R with v w = v 1 w 2 v 2 w 1 The vector product in R 2 is anti-symmetric, i.e. v w = w v 9 / 24

10 The Vector Cross Product (cont.) Definition (The vector cross product in R 3 ) We define the vector cross product of v, w R 3 as a mapping : R 3 R 3 R 3 with v 2 w 3 v 3 w 2 v w = v 3 w 1 v 1 w 3. v 1 w 2 v 2 w 1 The vector product in R 3 is also anti-symmetric, i.e. v w = w v The vector cross product has very useful properties, especially: for finding orthogonal vectors in R 3. for area and volume calculations in R 2 and R 3 respectively. 10 / 24

11 Vector cross products in MATLAB MATLAB provides a vector function cross to compute the cross product of two vectors in R 3 : >> v=[1 2 3]; >> w=[-1 1 2]; >> cross(v, w) ans = / 24

12 Differentiation in MATLAB Derivative of a poly() structure - polyder(), Poly Diff Eg.m >> a = [ ] ; % 3 x ˆ2 + 6 x + 9 >> k = p o l y d e r ( a ) k = 6 6 >>b = [ ] ; >> k = p o l y d e r ( b ) % x ˆ2 + 2 x k = 2 2 >> k = p o l y d e r ( a, b ) %(3x ˆ2 + 6 x + 9 ) ( x ˆ2 + 2 x ) k = MATLAB code for this at Poly Diff Eg.m 12 / 24

13 Symbolic Differentiation in MATLAB Symbolic Derivative via diff(), Symb Diff Eg.m >>syms x ; % D e c l a r e f ( x ) >>f = x ˆ2 + 2 x +1; % D i f f e r e n t i a t e f ( x ) >>d f = d i f f ( f ) ans = 2 x + 2 MATLAB code for this at Symb Diff Eg.m 13 / 24

14 Computing and Plotting Tangent to a Curve Symb Diff Eg.m continued % G r a d i a n t a t ( x0, y0 ) x0 = 1 ; y0= 5 ; % compute m + c ( y a x i s I n t e r c e p t ) m = s u b s ( df, x0 ) ; c = y0 m x0 ; %D e c l a r e t a n e q n = m x + c ; %P l o t f ( x ) and t a n g e n t a t ( x0, y0 ) e z p l o t ( tan eqn,[ ] ) ; h o l d on ; e z p l o t ( f,[ ] ) ; MATLAB code for this at Symb Diff Eg.m 14 / 24

15 Symb Diff Eg.m Output x x x 15 / 24

16 Stationary Points in MATLAB MATLAB Example:Stationary point eg.m syms x f = x ˆ3 3 x ˆ2 9 x + 2 ; d f = d i f f ( f ) ; % 1 s t d e r i v a t i v e d f 2 = d i f f ( d f ) ; %2nd d e r i v a t i v e % f i n d Turning p o i n t s % need d o u b l e ( ) from c o n v e r t s y m b o l i c v a r i a b l e t u r n p t s x = d o u b l e ( s o l v e ( d f ) ) ; t u r n p t s y = d o u b l e ( s u b s ( f, t u r n p t s x ) ) ; max min = d o u b l e ( s u b s ( df2, t u r n p t s x ) ) ;.... P l o t R e s u l t s ( s e e S t a t i o n a r y p o i n t e g.m f i l e ) Full MATLAB code at: Stationary point eg.m 16 / 24

17 Stationary point eg.m Output 600 x 3 3 x 2 9 x Max Min x 17 / 24

18 MATLAB Integration: poly() Integrals MATLAB lets you integrate poly() Polynomials: polyint() and trapz() >> p = [ ] % p = x ˆ2 % I n d e f i n i t e I n t e g r a l >> p o l y i n t ( p ) % Ans = x ˆ3/3 ans = % D e f i n i t e I n t e g r a l ( v i a n u m e r i c a l i n t e g r a t i o n ) >> t r a p z ( 6:6, p o l y v a l ( p, 6:6)) ans = / 24

19 MATALB Example: Area Under Graph (1) MATLAB Code to solve and plot above example: integral area.m % d e c l a r e f u n c t i o n and p l o t i t syms x p l o t r a n g e = [ 1 0, 1 0 ] ; f = x ˆ 2 ; e z p l o t ( f, p l o t r a n g e ) ; h o l d on ; % d e f i n e d e f i n i t e i n t e g r a l l i m i t s i n t l i m i t s = [ 6 6 ] ; % I n t e g r a t e i n t f = i n t ( f ) % I n d e f i n i t e I n t e g r a l % D e f i n i t e I n t e g r a l v i a I n d e f i n i t e r e s u l t i n t v a l i n d = i n t ( f, i n t l i m i t s ( 1 ), i n t l i m i t s ( 2 ) ) 19 / 24

20 MATALB Example: Area Under Graph (2) integral area.m Cont. % I d i o t Check! D e f i n i t e I n t e g r a l v i a I n d e f i n i t e r e s u l t s u b s ( i n t f, i n t l i m i t s ( 2 ) ) s u b s ( i n t f, i n t l i m i t s ( 1 ) ) % not r e a l l y a n e c e s s a r y b i t o f code as %Def. I n t i s t h e way to do i t! % Set up p l o t r a n g e = i n t l i m i t s ( 1 ) : 0. 1 : i n t l i m i t s ( 2 ) ; y = s u b s ( f, r a n g e ) ; %sample v a l u e s on c u r v e % Shade a r e a below t h e c u r v e a r e a ( range, y, FaceColor, [ 0, 0, 1 ], L i n e S t y l e, none ) ; Note: area()- useful plot function to shade areas of given graph values. MATLAB code for this at integral area.m 20 / 24

21 Example: Area Between Two Curves (1) MATLAB Code: integral area between.m % d e c l a r e f u n c t i o n s syms x p l o t r a n g e = [ 3, 3 ] ; f 1 = x ˆ2 + 6 ; f 2 = x ˆ2 2 x + 2 ; % Find P o i n t s o f I n t e r s e c t i o n o f c u r v e s r o o t s i n t e r s e c t = s o r t ( d o u b l e ( s o l v e ( f 1 f 2 ) ) ) ; % D e f i n i t e I n t e g r a l a r e a i n t e r s e c t = i n t ( f 1 f2, r o o t s i n t e r s e c t ( 1 ), r o o t s i n t e r s e c t ( 2 ) ) 21 / 24

22 Example: Area Between Two Curves (1) integral area between.m Cont. % Set up p l o t r a n g e = r o o t s i n t e r s e c t ( 1 ) : 0. 1 : r o o t s i n t e r s e c t ( 2 ) ; y = s u b s ( f1, r a n g e ) ; %sample v a l u e s on c u r v e f 1 % Shade Area f 1 a r e a ( range, y, FaceColor, [ 0, 0, 1 ], L i n e S t y l e, none ) h o l d on ; % rub out a r e a above t h e c u r v e y = s u b s ( f2, r a n g e ) ; %sample v a l u e s on c u r v e f 2 a r e a ( range, y, FaceColor, [ 1, 1, 1 ], L i n e S t y l e, none ) % P l o t f u n t i o n s o v e r p l o t r a n g e e z p l o t ( f1, p l o t r a n g e ) ; h f 2 = e z p l o t ( f2, p l o t r a n g e ) ; s e t ( hf2, Color, b l a c k ) ; MATLAB code for this at integral area between.m 22 / 24

23 MATLAB Example: Area Under x-axis (1) MATLAB Code: integral area under.m % d e c l a r e f u n c t i o n syms x p l o t r a n g e = [ 5, 5 ] ; i n t l i m i t s = [ 3, 3 ] ; f = x ˆ 3 ; % D e f i n i t e I n t e g r a l v i a I n d e f i n i t e r e s u l t i n t a r e a = i n t ( f, i n t l i m i t s ( 1 ), i n t l i m i t s ( 2 ) ) % WRONG ( f o r Area )! Answer i s ZERO % For x ˆ3 need to s p l i t a t x = 0 % E x e r c i s e : Write a g e n e r a l f u n c t i o n to work t h i s p o i n t out. % Do Area P r o p e r l y i n t a r e a = abs ( i n t ( f, i n t l i m i t s ( 1 ), 0 ) ) + abs ( i n t ( f, 0, i n t l i m i t s ( 2 ) 23 / 24

24 MATLAB code for this at integral area under.m 24 / 24 MATLAB Example: Area Under x-axis (2) MATLAB Code: integral area under.m % Set up p l o t r a n g e = i n t l i m i t s ( 1 ) : 0. 1 : 0 ; y = s u b s ( f, r a n g e ) ; %sample v a l u e s on c u r v e % Shade a r e a below t h e c u r v e a r e a ( range, y, FaceColor, [ 1, 0, 0 ], L i n e S t y l e, none ) ; h o l d on ; r a n g e = 0 : 0. 1 : i n t l i m i t s ( 2 ) ; y = s u b s ( f, r a n g e ) ; %sample v a l u e s on c u r v e % Shade a r e a below t h e c u r v e a r e a ( range, y, FaceColor, [ 0, 0, 1 ], L i n e S t y l e, none ) ; %p l o t f u n c t i o n h f =e z p l o t ( f, p l o t r a n g e ) ; s e t ( hf, Color, b l a c k ) ;

Applied Linear Algebra in Geoscience Using MATLAB

Applied Linear Algebra in Geoscience Using MATLAB Applied Linear Algebra in Geoscience Using MATLAB Contents Getting Started Creating Arrays Mathematical Operations with Arrays Using Script Files and Managing Data Two-Dimensional Plots Programming in

More information

1. Vectors.

1. Vectors. 1. Vectors 1.1 Vectors and Matrices Linear algebra is concerned with two basic kinds of quantities: vectors and matrices. 1.1 Vectors and Matrices Scalars and Vectors - Scalar: a numerical value denoted

More information

Lecture 20: 6.1 Inner Products

Lecture 20: 6.1 Inner Products Lecture 0: 6.1 Inner Products Wei-Ta Chu 011/1/5 Definition An inner product on a real vector space V is a function that associates a real number u, v with each pair of vectors u and v in V in such a way

More information

Inner Product Spaces 6.1 Length and Dot Product in R n

Inner Product Spaces 6.1 Length and Dot Product in R n Inner Product Spaces 6.1 Length and Dot Product in R n Summer 2017 Goals We imitate the concept of length and angle between two vectors in R 2, R 3 to define the same in the n space R n. Main topics are:

More information

6 Inner Product Spaces

6 Inner Product Spaces Lectures 16,17,18 6 Inner Product Spaces 6.1 Basic Definition Parallelogram law, the ability to measure angle between two vectors and in particular, the concept of perpendicularity make the euclidean space

More information

(, ) : R n R n R. 1. It is bilinear, meaning it s linear in each argument: that is

(, ) : R n R n R. 1. It is bilinear, meaning it s linear in each argument: that is 17 Inner products Up until now, we have only examined the properties of vectors and matrices in R n. But normally, when we think of R n, we re really thinking of n-dimensional Euclidean space - that is,

More information

Inner Product Spaces 5.2 Inner product spaces

Inner Product Spaces 5.2 Inner product spaces Inner Product Spaces 5.2 Inner product spaces November 15 Goals Concept of length, distance, and angle in R 2 or R n is extended to abstract vector spaces V. Sucn a vector space will be called an Inner

More information

Best approximation in the 2-norm

Best approximation in the 2-norm Best approximation in the 2-norm Department of Mathematical Sciences, NTNU september 26th 2012 Vector space A real vector space V is a set with a 0 element and three operations: Addition: x, y V then x

More information

Linear Algebra Massoud Malek

Linear Algebra Massoud Malek CSUEB Linear Algebra Massoud Malek Inner Product and Normed Space In all that follows, the n n identity matrix is denoted by I n, the n n zero matrix by Z n, and the zero vector by θ n An inner product

More information

Lecture 23: 6.1 Inner Products

Lecture 23: 6.1 Inner Products Lecture 23: 6.1 Inner Products Wei-Ta Chu 2008/12/17 Definition An inner product on a real vector space V is a function that associates a real number u, vwith each pair of vectors u and v in V in such

More information

EGR2013 Tutorial 8. Linear Algebra. Powers of a Matrix and Matrix Polynomial

EGR2013 Tutorial 8. Linear Algebra. Powers of a Matrix and Matrix Polynomial EGR1 Tutorial 8 Linear Algebra Outline Powers of a Matrix and Matrix Polynomial Vector Algebra Vector Spaces Powers of a Matrix and Matrix Polynomial If A is a square matrix, then we define the nonnegative

More information

The Transpose of a Vector

The Transpose of a Vector 8 CHAPTER Vectors The Transpose of a Vector We now consider the transpose of a vector in R n, which is a row vector. For a vector u 1 u. u n the transpose is denoted by u T = [ u 1 u u n ] EXAMPLE -5 Find

More information

ORTHOGONALITY AND LEAST-SQUARES [CHAP. 6]

ORTHOGONALITY AND LEAST-SQUARES [CHAP. 6] ORTHOGONALITY AND LEAST-SQUARES [CHAP. 6] Inner products and Norms Inner product or dot product of 2 vectors u and v in R n : u.v = u 1 v 1 + u 2 v 2 + + u n v n Calculate u.v when u = 1 2 2 0 v = 1 0

More information

VECTORS vectors & scalars vector direction magnitude scalar only magnitude

VECTORS vectors & scalars vector direction magnitude scalar only magnitude VECTORS Physical quantities are classified in two big classes: vectors & scalars. A vector is a physical quantity which is completely defined once we know precisely its direction and magnitude (for example:

More information

C. Incorrect! This symbol means greater than or equal to or at least. D. Correct! This symbol means at most or less than or equal to.

C. Incorrect! This symbol means greater than or equal to or at least. D. Correct! This symbol means at most or less than or equal to. SAT Math - Problem Drill 10: Inequalities No. 1 of 10 1. Choose the inequality symbol that means at most. (A) > (B) < (C) (D) (E) This symbol means greater than. This symbol means less than. This symbol

More information

Designing Information Devices and Systems I Fall 2018 Lecture Notes Note 21

Designing Information Devices and Systems I Fall 2018 Lecture Notes Note 21 EECS 16A Designing Information Devices and Systems I Fall 2018 Lecture Notes Note 21 21.1 Module Goals In this module, we introduce a family of ideas that are connected to optimization and machine learning,

More information

Last week we presented the following expression for the angles between two vectors u and v in R n ( ) θ = cos 1 u v

Last week we presented the following expression for the angles between two vectors u and v in R n ( ) θ = cos 1 u v Orthogonality (I) Last week we presented the following expression for the angles between two vectors u and v in R n ( ) θ = cos 1 u v u v which brings us to the fact that θ = π/2 u v = 0. Definition (Orthogonality).

More information

MATH.2720 Introduction to Programming with MATLAB Vector and Matrix Algebra

MATH.2720 Introduction to Programming with MATLAB Vector and Matrix Algebra MATH.2720 Introduction to Programming with MATLAB Vector and Matrix Algebra A. Vectors A vector is a quantity that has both magnitude and direction, like velocity. The location of a vector is irrelevant;

More information

LINEAR ALGEBRA W W L CHEN

LINEAR ALGEBRA W W L CHEN LINEAR ALGEBRA W W L CHEN c W W L Chen, 1997, 2008. This chapter is available free to all individuals, on the understanding that it is not to be used for financial gain, and may be downloaded and/or photocopied,

More information

Dot Products. K. Behrend. April 3, Abstract A short review of some basic facts on the dot product. Projections. The spectral theorem.

Dot Products. K. Behrend. April 3, Abstract A short review of some basic facts on the dot product. Projections. The spectral theorem. Dot Products K. Behrend April 3, 008 Abstract A short review of some basic facts on the dot product. Projections. The spectral theorem. Contents The dot product 3. Length of a vector........................

More information

Projection Theorem 1

Projection Theorem 1 Projection Theorem 1 Cauchy-Schwarz Inequality Lemma. (Cauchy-Schwarz Inequality) For all x, y in an inner product space, [ xy, ] x y. Equality holds if and only if x y or y θ. Proof. If y θ, the inequality

More information

Solution. The relationship between cartesian coordinates (x, y) and polar coordinates (r, θ) is given by. (x, y) = (r cos θ, r sin θ).

Solution. The relationship between cartesian coordinates (x, y) and polar coordinates (r, θ) is given by. (x, y) = (r cos θ, r sin θ). Problem 1. Let p 1 be the point having polar coordinates r = 1 and θ = π. Let p 2 be the point having polar coordinates r = 1 and θ = π/2. Find the Euclidean distance between p 1 and p 2. The relationship

More information

Intro Vectors 2D implicit curves 2D parametric curves. Graphics 2012/2013, 4th quarter. Lecture 2: vectors, curves, and surfaces

Intro Vectors 2D implicit curves 2D parametric curves. Graphics 2012/2013, 4th quarter. Lecture 2: vectors, curves, and surfaces Lecture 2, curves, and surfaces Organizational remarks Tutorials: TA sessions for tutorial 1 start today Tutorial 2 will go online after lecture 3 Practicals: Make sure to find a team partner very soon

More information

Sec. 1.1: Basics of Vectors

Sec. 1.1: Basics of Vectors Sec. 1.1: Basics of Vectors Notation for Euclidean space R n : all points (x 1, x 2,..., x n ) in n-dimensional space. Examples: 1. R 1 : all points on the real number line. 2. R 2 : all points (x 1, x

More information

Intro Vectors 2D implicit curves 2D parametric curves. Graphics 2011/2012, 4th quarter. Lecture 2: vectors, curves, and surfaces

Intro Vectors 2D implicit curves 2D parametric curves. Graphics 2011/2012, 4th quarter. Lecture 2: vectors, curves, and surfaces Lecture 2, curves, and surfaces Organizational remarks Tutorials: Tutorial 1 will be online later today TA sessions for questions start next week Practicals: Exams: Make sure to find a team partner very

More information

Applied Linear Algebra in Geoscience Using MATLAB

Applied Linear Algebra in Geoscience Using MATLAB Applied Linear Algebra in Geoscience Using MATLAB Contents Getting Started Creating Arrays Mathematical Operations with Arrays Using Script Files and Managing Data Two-Dimensional Plots Programming in

More information

Lecture # 3 Orthogonal Matrices and Matrix Norms. We repeat the definition an orthogonal set and orthornormal set.

Lecture # 3 Orthogonal Matrices and Matrix Norms. We repeat the definition an orthogonal set and orthornormal set. Lecture # 3 Orthogonal Matrices and Matrix Norms We repeat the definition an orthogonal set and orthornormal set. Definition A set of k vectors {u, u 2,..., u k }, where each u i R n, is said to be an

More information

Data Mining and Analysis

Data Mining and Analysis 978--5-766- - Data Mining and Analysis: Fundamental Concepts and Algorithms CHAPTER Data Mining and Analysis Data mining is the process of discovering insightful, interesting, and novel patterns, as well

More information

Dot product and linear least squares problems

Dot product and linear least squares problems Dot product and linear least squares problems Dot Product For vectors u,v R n we define the dot product Note that we can also write this as u v = u,,u n u v = u v + + u n v n v v n = u v + + u n v n The

More information

Worksheet 1.8: Geometry of Vector Derivatives

Worksheet 1.8: Geometry of Vector Derivatives Boise State Math 275 (Ultman) Worksheet 1.8: Geometry of Vector Derivatives From the Toolbox (what you need from previous classes): Calc I: Computing derivatives of single-variable functions y = f (t).

More information

Linear Algebra. 1.1 Introduction to vectors 1.2 Lengths and dot products. January 28th, 2013 Math 301. Monday, January 28, 13

Linear Algebra. 1.1 Introduction to vectors 1.2 Lengths and dot products. January 28th, 2013 Math 301. Monday, January 28, 13 Linear Algebra 1.1 Introduction to vectors 1.2 Lengths and dot products January 28th, 2013 Math 301 Notation for linear systems 12w +4x + 23y +9z =0 2u + v +5w 2x +2y +8z =1 5u + v 6w +2x +4y z =6 8u 4v

More information

Math Review. Daniel B. Rowe, Ph.D. Professor Department of Mathematics, Statistics, and Computer Science. Copyright 2018 by D.B.

Math Review. Daniel B. Rowe, Ph.D. Professor Department of Mathematics, Statistics, and Computer Science. Copyright 2018 by D.B. Math Review Daniel B. Rowe, Ph.D. Professor Department of Mathematics, Statistics, and Computer Science Copyright 2018 by 1 Outline Differentiation Definition Analytic Approach Numerical Approach Integration

More information

Recall: Dot product on R 2 : u v = (u 1, u 2 ) (v 1, v 2 ) = u 1 v 1 + u 2 v 2, u u = u u 2 2 = u 2. Geometric Meaning:

Recall: Dot product on R 2 : u v = (u 1, u 2 ) (v 1, v 2 ) = u 1 v 1 + u 2 v 2, u u = u u 2 2 = u 2. Geometric Meaning: Recall: Dot product on R 2 : u v = (u 1, u 2 ) (v 1, v 2 ) = u 1 v 1 + u 2 v 2, u u = u 2 1 + u 2 2 = u 2. Geometric Meaning: u v = u v cos θ. u θ v 1 Reason: The opposite side is given by u v. u v 2 =

More information

LINEAR ALGEBRA - CHAPTER 1: VECTORS

LINEAR ALGEBRA - CHAPTER 1: VECTORS LINEAR ALGEBRA - CHAPTER 1: VECTORS A game to introduce Linear Algebra In measurement, there are many quantities whose description entirely rely on magnitude, i.e., length, area, volume, mass and temperature.

More information

What are vectors. Adding Vectors

What are vectors. Adding Vectors Vectors Introduction What are vectors Each vector is defined by two pieces of information: Direction and Magnitude. Often vectors are described by a picture representation or by ordered pairs which describe

More information

Linear Algebra Review. Vectors

Linear Algebra Review. Vectors Linear Algebra Review 9/4/7 Linear Algebra Review By Tim K. Marks UCSD Borrows heavily from: Jana Kosecka http://cs.gmu.edu/~kosecka/cs682.html Virginia de Sa (UCSD) Cogsci 8F Linear Algebra review Vectors

More information

which has a check digit of 9. This is consistent with the first nine digits of the ISBN, since

which has a check digit of 9. This is consistent with the first nine digits of the ISBN, since vector Then the check digit c is computed using the following procedure: 1. Form the dot product. 2. Divide by 11, thereby producing a remainder c that is an integer between 0 and 10, inclusive. The check

More information

Inner products. Theorem (basic properties): Given vectors u, v, w in an inner product space V, and a scalar k, the following properties hold:

Inner products. Theorem (basic properties): Given vectors u, v, w in an inner product space V, and a scalar k, the following properties hold: Inner products Definition: An inner product on a real vector space V is an operation (function) that assigns to each pair of vectors ( u, v) in V a scalar u, v satisfying the following axioms: 1. u, v

More information

orthogonal relations between vectors and subspaces Then we study some applications in vector spaces and linear systems, including Orthonormal Basis,

orthogonal relations between vectors and subspaces Then we study some applications in vector spaces and linear systems, including Orthonormal Basis, 5 Orthogonality Goals: We use scalar products to find the length of a vector, the angle between 2 vectors, projections, orthogonal relations between vectors and subspaces Then we study some applications

More information

1. General Vector Spaces

1. General Vector Spaces 1.1. Vector space axioms. 1. General Vector Spaces Definition 1.1. Let V be a nonempty set of objects on which the operations of addition and scalar multiplication are defined. By addition we mean a rule

More information

INNER PRODUCT SPACE. Definition 1

INNER PRODUCT SPACE. Definition 1 INNER PRODUCT SPACE Definition 1 Suppose u, v and w are all vectors in vector space V and c is any scalar. An inner product space on the vectors space V is a function that associates with each pair of

More information

Section 8.2 Vector Angles

Section 8.2 Vector Angles Section 8.2 Vector Angles INTRODUCTION Recall that a vector has these two properties: 1. It has a certain length, called magnitude 2. It has a direction, indicated by an arrow at one end. In this section

More information

Linear Algebra. Alvin Lin. August December 2017

Linear Algebra. Alvin Lin. August December 2017 Linear Algebra Alvin Lin August 207 - December 207 Linear Algebra The study of linear algebra is about two basic things. We study vector spaces and structure preserving maps between vector spaces. A vector

More information

Matrix Algebra: Vectors

Matrix Algebra: Vectors A Matrix Algebra: Vectors A Appendix A: MATRIX ALGEBRA: VECTORS A 2 A MOTIVATION Matrix notation was invented primarily to express linear algebra relations in compact form Compactness enhances visualization

More information

Inner Product Spaces

Inner Product Spaces Inner Product Spaces Linear Algebra Josh Engwer TTU 28 October 2015 Josh Engwer (TTU) Inner Product Spaces 28 October 2015 1 / 15 Inner Product Space (Definition) An inner product is the notion of a dot

More information

7 Bilinear forms and inner products

7 Bilinear forms and inner products 7 Bilinear forms and inner products Definition 7.1 A bilinear form θ on a vector space V over a field F is a function θ : V V F such that θ(λu+µv,w) = λθ(u,w)+µθ(v,w) θ(u,λv +µw) = λθ(u,v)+µθ(u,w) for

More information

Lecture Notes 1: Vector spaces

Lecture Notes 1: Vector spaces Optimization-based data analysis Fall 2017 Lecture Notes 1: Vector spaces In this chapter we review certain basic concepts of linear algebra, highlighting their application to signal processing. 1 Vector

More information

Computational Methods CMSC/AMSC/MAPL 460. Linear Systems, Matrices, LU Decomposition, Ramani Duraiswami, Dept. of Computer Science

Computational Methods CMSC/AMSC/MAPL 460. Linear Systems, Matrices, LU Decomposition, Ramani Duraiswami, Dept. of Computer Science Computational ethods CSC/ASC/APL 460 Linear Systems, atrices, LU Decomposition, Ramani Duraiswami, Dept. of Computer Science Class Outline uch of scientific computation involves solution of linear equations

More information

MAT 1339-S14 Class 8

MAT 1339-S14 Class 8 MAT 1339-S14 Class 8 July 28, 2014 Contents 7.2 Review Dot Product........................... 2 7.3 Applications of the Dot Product..................... 4 7.4 Vectors in Three-Space.........................

More information

Chapter 6 Additional Topics in Trigonometry, Part II

Chapter 6 Additional Topics in Trigonometry, Part II Chapter 6 Additional Topics in Trigonometry, Part II Section 3 Section 4 Section 5 Vectors in the Plane Vectors and Dot Products Trigonometric Form of a Complex Number Vocabulary Directed line segment

More information

Notes on Linear Algebra and Matrix Theory

Notes on Linear Algebra and Matrix Theory Massimo Franceschet featuring Enrico Bozzo Scalar product The scalar product (a.k.a. dot product or inner product) of two real vectors x = (x 1,..., x n ) and y = (y 1,..., y n ) is not a vector but a

More information

Class notes: Approximation

Class notes: Approximation Class notes: Approximation Introduction Vector spaces, linear independence, subspace The goal of Numerical Analysis is to compute approximations We want to approximate eg numbers in R or C vectors in R

More information

Inner Product, Length, and Orthogonality

Inner Product, Length, and Orthogonality Inner Product, Length, and Orthogonality Linear Algebra MATH 2076 Linear Algebra,, Chapter 6, Section 1 1 / 13 Algebraic Definition for Dot Product u 1 v 1 u 2 Let u =., v = v 2. be vectors in Rn. The

More information

Inner Product Spaces

Inner Product Spaces Inner Product Spaces Introduction Recall in the lecture on vector spaces that geometric vectors (i.e. vectors in two and three-dimensional Cartesian space have the properties of addition, subtraction,

More information

Linear Algebra II. 7 Inner product spaces. Notes 7 16th December Inner products and orthonormal bases

Linear Algebra II. 7 Inner product spaces. Notes 7 16th December Inner products and orthonormal bases MTH6140 Linear Algebra II Notes 7 16th December 2010 7 Inner product spaces Ordinary Euclidean space is a 3-dimensional vector space over R, but it is more than that: the extra geometric structure (lengths,

More information

x 1. x n i + x 2 j (x 1, x 2, x 3 ) = x 1 j + x 3

x 1. x n i + x 2 j (x 1, x 2, x 3 ) = x 1 j + x 3 Version: 4/1/06. Note: These notes are mostly from my 5B course, with the addition of the part on components and projections. Look them over to make sure that we are on the same page as regards inner-products,

More information

DS-GA 1002 Lecture notes 0 Fall Linear Algebra. These notes provide a review of basic concepts in linear algebra.

DS-GA 1002 Lecture notes 0 Fall Linear Algebra. These notes provide a review of basic concepts in linear algebra. DS-GA 1002 Lecture notes 0 Fall 2016 Linear Algebra These notes provide a review of basic concepts in linear algebra. 1 Vector spaces You are no doubt familiar with vectors in R 2 or R 3, i.e. [ ] 1.1

More information

Vectors. Vectors and the scalar multiplication and vector addition operations:

Vectors. Vectors and the scalar multiplication and vector addition operations: Vectors Vectors and the scalar multiplication and vector addition operations: x 1 x 1 y 1 2x 1 + 3y 1 x x n 1 = 2 x R n, 2 2 y + 3 2 2x = 2 + 3y 2............ x n x n y n 2x n + 3y n I ll use the two terms

More information

MATH 235: Inner Product Spaces, Assignment 7

MATH 235: Inner Product Spaces, Assignment 7 MATH 235: Inner Product Spaces, Assignment 7 Hand in questions 3,4,5,6,9, by 9:3 am on Wednesday March 26, 28. Contents Orthogonal Basis for Inner Product Space 2 2 Inner-Product Function Space 2 3 Weighted

More information

Omm Al-Qura University Dr. Abdulsalam Ai LECTURE OUTLINE CHAPTER 3. Vectors in Physics

Omm Al-Qura University Dr. Abdulsalam Ai LECTURE OUTLINE CHAPTER 3. Vectors in Physics LECTURE OUTLINE CHAPTER 3 Vectors in Physics 3-1 Scalars Versus Vectors Scalar a numerical value (number with units). May be positive or negative. Examples: temperature, speed, height, and mass. Vector

More information

Review: Linear and Vector Algebra

Review: Linear and Vector Algebra Review: Linear and Vector Algebra Points in Euclidean Space Location in space Tuple of n coordinates x, y, z, etc Cannot be added or multiplied together Vectors: Arrows in Space Vectors are point changes

More information

Practical Linear Algebra: A Geometry Toolbox

Practical Linear Algebra: A Geometry Toolbox Practical Linear Algebra: A Geometry Toolbox Third edition Chapter 2: Here and There: Points and Vectors in 2D Gerald Farin & Dianne Hansford CRC Press, Taylor & Francis Group, An A K Peters Book www.farinhansford.com/books/pla

More information

Polar Form of a Complex Number (I)

Polar Form of a Complex Number (I) Polar Form of a Complex Number (I) The polar form of a complex number z = x + iy is given by z = r (cos θ + i sin θ) where θ is the angle from the real axes to the vector z and r is the modulus of z, i.e.

More information

Vectors for Physics. AP Physics C

Vectors for Physics. AP Physics C Vectors for Physics AP Physics C A Vector is a quantity that has a magnitude (size) AND a direction. can be in one-dimension, two-dimensions, or even three-dimensions can be represented using a magnitude

More information

MCV4U - Practice Mastery Test #1

MCV4U - Practice Mastery Test #1 Name: Class: Date: ID: A MCVU - Practice Mastery Test # Multiple Choice Identify the choice that best completes the statement or answers the question.. Solve a + b = a b = 5 a. a= & b=- b. a=- & b= c.

More information

Introduction to Time Series Analysis. Lecture 7.

Introduction to Time Series Analysis. Lecture 7. Last lecture: Introduction to Time Series Analysis. Lecture 7. Peter Bartlett 1. ARMA(p,q) models: stationarity, causality, invertibility 2. The linear process representation of ARMA processes: ψ. 3. Autocovariance

More information

Definition 1. A set V is a vector space over the scalar field F {R, C} iff. there are two operations defined on V, called vector addition

Definition 1. A set V is a vector space over the scalar field F {R, C} iff. there are two operations defined on V, called vector addition 6 Vector Spaces with Inned Product Basis and Dimension Section Objective(s): Vector Spaces and Subspaces Linear (In)dependence Basis and Dimension Inner Product 6 Vector Spaces and Subspaces Definition

More information

Lecture 6: Geometry of OLS Estimation of Linear Regession

Lecture 6: Geometry of OLS Estimation of Linear Regession Lecture 6: Geometry of OLS Estimation of Linear Regession Xuexin Wang WISE Oct 2013 1 / 22 Matrix Algebra An n m matrix A is a rectangular array that consists of nm elements arranged in n rows and m columns

More information

Review of Coordinate Systems

Review of Coordinate Systems Vector in 2 R and 3 R Review of Coordinate Systems Used to describe the position of a point in space Common coordinate systems are: Cartesian Polar Cartesian Coordinate System Also called rectangular coordinate

More information

Math 276, Spring 2007 Additional Notes on Vectors

Math 276, Spring 2007 Additional Notes on Vectors Math 276, Spring 2007 Additional Notes on Vectors 1.1. Real Vectors. 1. Scalar Products If x = (x 1,..., x n ) is a vector in R n then the length of x is x = x 2 1 + + x2 n. We sometimes use the notation

More information

x 1 x 2. x 1, x 2,..., x n R. x n

x 1 x 2. x 1, x 2,..., x n R. x n WEEK In general terms, our aim in this first part of the course is to use vector space theory to study the geometry of Euclidean space A good knowledge of the subject matter of the Matrix Applications

More information

A. Incorrect! This inequality is a disjunction and has a solution set shaded outside the boundary points.

A. Incorrect! This inequality is a disjunction and has a solution set shaded outside the boundary points. Problem Solving Drill 11: Absolute Value Inequalities Question No. 1 of 10 Question 1. Which inequality has the solution set shown in the graph? Question #01 (A) x + 6 > 1 (B) x + 6 < 1 (C) x + 6 1 (D)

More information

MATH Linear Algebra

MATH Linear Algebra MATH 304 - Linear Algebra In the previous note we learned an important algorithm to produce orthogonal sequences of vectors called the Gramm-Schmidt orthogonalization process. Gramm-Schmidt orthogonalization

More information

Definitions and Properties of R N

Definitions and Properties of R N Definitions and Properties of R N R N as a set As a set R n is simply the set of all ordered n-tuples (x 1,, x N ), called vectors. We usually denote the vector (x 1,, x N ), (y 1,, y N ), by x, y, or

More information

Vectors. The standard geometric definition of vector is as something which has direction and magnitude but not position.

Vectors. The standard geometric definition of vector is as something which has direction and magnitude but not position. Vectors The standard geometric definition of vector is as something which has direction and magnitude but not position. Since vectors have no position we may place them wherever is convenient. Vectors

More information

Lecture 1 Introduction

Lecture 1 Introduction L. Vandenberghe EE236A (Fall 2013-14) Lecture 1 Introduction course overview linear optimization examples history approximate syllabus basic definitions linear optimization in vector and matrix notation

More information

APPLICATIONS OF DIFFERENTIABILITY IN R n.

APPLICATIONS OF DIFFERENTIABILITY IN R n. APPLICATIONS OF DIFFERENTIABILITY IN R n. MATANIA BEN-ARTZI April 2015 Functions here are defined on a subset T R n and take values in R m, where m can be smaller, equal or greater than n. The (open) ball

More information

There are two things that are particularly nice about the first basis

There are two things that are particularly nice about the first basis Orthogonality and the Gram-Schmidt Process In Chapter 4, we spent a great deal of time studying the problem of finding a basis for a vector space We know that a basis for a vector space can potentially

More information

Prof. M. Saha Professor of Mathematics The University of Burdwan West Bengal, India

Prof. M. Saha Professor of Mathematics The University of Burdwan West Bengal, India CHAPTER 9 BY Prof. M. Saha Professor of Mathematics The University of Burdwan West Bengal, India E-mail : mantusaha.bu@gmail.com Introduction and Objectives In the preceding chapters, we discussed normed

More information

MATH 304 Linear Algebra Lecture 19: Least squares problems (continued). Norms and inner products.

MATH 304 Linear Algebra Lecture 19: Least squares problems (continued). Norms and inner products. MATH 304 Linear Algebra Lecture 19: Least squares problems (continued). Norms and inner products. Orthogonal projection Theorem 1 Let V be a subspace of R n. Then any vector x R n is uniquely represented

More information

Math 302 Outcome Statements Winter 2013

Math 302 Outcome Statements Winter 2013 Math 302 Outcome Statements Winter 2013 1 Rectangular Space Coordinates; Vectors in the Three-Dimensional Space (a) Cartesian coordinates of a point (b) sphere (c) symmetry about a point, a line, and a

More information

Vectors in Physics. Topics to review:

Vectors in Physics. Topics to review: Vectors in Physics Topics to review: Scalars Versus Vectors The Components of a Vector Adding and Subtracting Vectors Unit Vectors Position, Displacement, Velocity, and Acceleration Vectors Relative Motion

More information

Grade 12 Precalculus 3 rd Nine Weeks Pacing Guide

Grade 12 Precalculus 3 rd Nine Weeks Pacing Guide Week 1 (1/ 4-6) Week 2 (1/9-13) Week 3 (1/16-20) 2016-2017 Grade 12 3 rd Nine Weeks Pacing Guide Review content prerequisites. 26. [F-TF.10] Determine the amplitude, period, phase shift, domain, and range

More information

MATH0328: Numerical Linear Algebra Homework 3 SOLUTIONS

MATH0328: Numerical Linear Algebra Homework 3 SOLUTIONS MATH038: Numerical Linear Algebra Homework 3 SOLUTIONS Due Wednesday, March 8 Instructions Complete the following problems. Show all work. Only use Matlab on problems that are marked with (MATLAB). Include

More information

Linear Algebra & Geometry why is linear algebra useful in computer vision?

Linear Algebra & Geometry why is linear algebra useful in computer vision? Linear Algebra & Geometry why is linear algebra useful in computer vision? References: -Any book on linear algebra! -[HZ] chapters 2, 4 Some of the slides in this lecture are courtesy to Prof. Octavia

More information

Part 1a: Inner product, Orthogonality, Vector/Matrix norm

Part 1a: Inner product, Orthogonality, Vector/Matrix norm Part 1a: Inner product, Orthogonality, Vector/Matrix norm September 19, 2018 Numerical Linear Algebra Part 1a September 19, 2018 1 / 16 1. Inner product on a linear space V over the number field F A map,

More information

Vector Geometry. Chapter 5

Vector Geometry. Chapter 5 Chapter 5 Vector Geometry In this chapter we will look more closely at certain geometric aspects of vectors in R n. We will first develop an intuitive understanding of some basic concepts by looking at

More information

Vectors and the Geometry of Space

Vectors and the Geometry of Space Vectors and the Geometry of Space Many quantities in geometry and physics, such as area, volume, temperature, mass, and time, can be characterized by a single real number scaled to appropriate units of

More information

Fall TMA4145 Linear Methods. Exercise set 10

Fall TMA4145 Linear Methods. Exercise set 10 Norwegian University of Science and Technology Department of Mathematical Sciences TMA445 Linear Methods Fall 207 Exercise set 0 Please justify your answers! The most important part is how you arrive at

More information

4.1 Distance and Length

4.1 Distance and Length Chapter Vector Geometry In this chapter we will look more closely at certain geometric aspects of vectors in R n. We will first develop an intuitive understanding of some basic concepts by looking at vectors

More information

Riemannian geometry of surfaces

Riemannian geometry of surfaces Riemannian geometry of surfaces In this note, we will learn how to make sense of the concepts of differential geometry on a surface M, which is not necessarily situated in R 3. This intrinsic approach

More information

Euclidean Spaces. Euclidean Spaces. Chapter 10 -S&B

Euclidean Spaces. Euclidean Spaces. Chapter 10 -S&B Chapter 10 -S&B The Real Line: every real number is represented by exactly one point on the line. The plane (i.e., consumption bundles): Pairs of numbers have a geometric representation Cartesian plane

More information

Linear Analysis Lecture 5

Linear Analysis Lecture 5 Linear Analysis Lecture 5 Inner Products and V Let dim V < with inner product,. Choose a basis B and let v, w V have coordinates in F n given by x 1. x n and y 1. y n, respectively. Let A F n n be the

More information

Definitions for Quizzes

Definitions for Quizzes Definitions for Quizzes Italicized text (or something close to it) will be given to you. Plain text is (an example of) what you should write as a definition. [Bracketed text will not be given, nor does

More information

Math 290, Midterm II-key

Math 290, Midterm II-key Math 290, Midterm II-key Name (Print): (first) Signature: (last) The following rules apply: There are a total of 20 points on this 50 minutes exam. This contains 7 pages (including this cover page) and

More information

Linear Algebra I for Science (NYC)

Linear Algebra I for Science (NYC) Element No. 1: To express concrete problems as linear equations. To solve systems of linear equations using matrices. Topic: MATRICES 1.1 Give the definition of a matrix, identify the elements and the

More information

Further Mathematical Methods (Linear Algebra) 2002

Further Mathematical Methods (Linear Algebra) 2002 Further Mathematical Methods (Linear Algebra) 22 Solutions For Problem Sheet 3 In this Problem Sheet, we looked at some problems on real inner product spaces. In particular, we saw that many different

More information

Vector spaces. DS-GA 1013 / MATH-GA 2824 Optimization-based Data Analysis.

Vector spaces. DS-GA 1013 / MATH-GA 2824 Optimization-based Data Analysis. Vector spaces DS-GA 1013 / MATH-GA 2824 Optimization-based Data Analysis http://www.cims.nyu.edu/~cfgranda/pages/obda_fall17/index.html Carlos Fernandez-Granda Vector space Consists of: A set V A scalar

More information

Math 350 Fall 2011 Notes about inner product spaces. In this notes we state and prove some important properties of inner product spaces.

Math 350 Fall 2011 Notes about inner product spaces. In this notes we state and prove some important properties of inner product spaces. Math 350 Fall 2011 Notes about inner product spaces In this notes we state and prove some important properties of inner product spaces. First, recall the dot product on R n : if x, y R n, say x = (x 1,...,

More information

y 2 . = x 1y 1 + x 2 y x + + x n y n 2 7 = 1(2) + 3(7) 5(4) = 3. x x = x x x2 n.

y 2 . = x 1y 1 + x 2 y x + + x n y n 2 7 = 1(2) + 3(7) 5(4) = 3. x x = x x x2 n. 6.. Length, Angle, and Orthogonality In this section, we discuss the defintion of length and angle for vectors and define what it means for two vectors to be orthogonal. Then, we see that linear systems

More information