02geomtry.mws

Partial Differential Equations PowerTool

by Dr. Jim Herod

Section 1.2: Geometry in Linear Spaces

Maple Packages for Section 1.2

>    with(LinearAlgebra):

>   

A scientist or engineer wants geometry with the linear algebra. Algebra is important. It always has been. Especially in today's world, algebra has become a most important part of the mathematical community. The scientist, however, wants to measure distances and make approximations. These require geometry. In this section, we will recall how to measure distances in linear spaces and how to conceive that two vectors in n-dimensional space can be perpendicular, or orthogonal.

We must begin such a discussion by thinking about norms. What is a norm?

Definition:  In a linear space, the norm  is a function with domain the objects in the space and range non-negative numbers. We denote the norm of a vector x  by | x  |, or by || x  ||. The norm must have the following properties:

(1) if   x <> 0 , then | x  | > 0,

(2) if a  is a number and x  is a vector, then |  a x  | = | a | | x  |, ( Here, | a | denotes the absolute value of a. )

(3) if x  and y  are vectors, then abs(x+y) <= abs(x)+abs(y)  .

In the above discussion, it becomes clear that the absolute value function is a norm for real numbers. Typically, the same notation is used for the norm of x  when x  is a vector as is used for the absolute value of x  when x  is a number: | x  |. Some authors distinguish these with | x | being the absolute value of the number x  and || x  || being the norm of the vector x . That's good, but the context usually enables the reader to tell which is absolute value and which is norm. We usually choose the simpler route, and depend on the context to distinguish these. Having said that, I immediately use separate notation for each in the next illustrations.

There are many norms for the linear space R^n . Here are some illustrations in R^3 .

(1) The one norm: || [x,y,z] || ` `[1]  = |x| + |y| + |z|,

(2) The two norm (or, the usual norm): || [x,y,z] || ` `[2]  = sqrt(x^2+y^2+z^2) ,

(3) The infinity norm: || [x,y,z] || ` `[infinity]  = max( abs(x), abs(y), abs(z) ).

Question:  Compute the value of each of these norms as applied to the vector [1,-2,3].

The Answer Using Maple

>    Norm(<1,-2,3>,1);

6

>    Norm(<1,-2,3>,2);

14^(1/2)

>    Norm(<1,-2,3>,infinity);

3

>   

The linear space C([0,1] of continuous functions on [0, 1] has similar norms. Three that correspond to the ones above are given here.

(1) The one norm:  || f || ` `[1]   =   int(abs(f(x)),x = 0 .. 1) ,

(2) The two norm: || f || ` `[2]   =    sqrt(int(f(x)^2,x = 0 .. 1)) ,

(3) The infinity norm: || f || ` `[infinity]   = max[x](abs(f(x))) , where x has values in [0, 1].

Question:  Compute the value of each of these norms as applied to the function sin( Pi  x) over the interval [0, 1]

The Answer Using Maple

>    int(abs(sin(Pi*x)),x=0..1);

2/Pi

>    sqrt(int(sin(Pi*x)^2,x=0..1));

1/2*2^(1/2)

>    maximize(abs(sin(Pi*x)),x=0..1);

1

>   

Caveat Emptor:  In computing the norms of complex valued vectors or complex valued functions, then the two norm for R^3  and for C([0, 1]) should be

           || [x,y,z] || ` `[2]  = sqrt(abs(x)^2+abs(y)^2+abs(z)^2)     or    || f || ` `[2]   =   sqrt(int(abs(f(x))^2,x = 0 .. 1)) .

After all, the square of a complex number is a complex number. We cannot guarantee such a thing is non-negative. Consequently, the absolute value is needed. This situation does not arise if all the functions involved are real valued as we expect them to be in this series of lectures.

We now have the tools to discuss distance, one of the three important concepts in this lecture. We will use the concept of distance in order to quantify the idea that an approximation for a function, or vector, is close .

Definition:  In a normed space, the distance between x  and y  in the space is defined using the norm:

                 d( x, y ) = || x - y  ||.

Question:  In R^3  and with the usual norm, compute the distance between the vectors [1, 1, 3] and [-1, 2, 4].

Answer Using Maple

>    Norm(<1,1,3>-<-1,2,4>,2);

6^(1/2)

>   

Question:  In C([-1, 1]) and with the usual norm, which of the following quadratic polynomials is closer to cos(Pi*x/2) . Draw graphs of the polynomials and cos(Pi*x/2)  coloring them red, blue, green, and black, respectively:

           1-x^2  ,   0.9706-0.9755 x^2 ,  and  0.9802 - 1.0306 x^2 .

The Answer Using Maple

First, we draw the graph of the four function in order to see that they are all close to cos(Pi*x/2)

>    plot([1-x^2,0.9706-0.9755*x^2,0.9802-1.0306*x^2,cos(Pi*x/2)],
          x=-1..1,color=[red,blue,green,black]);

[Maple Plot]

Now, we measure the distance between the polynomials and cos(Pi*x/2)

>    P:=x->1-x^2;
sqrt(int((P(x)-cos(Pi*x/2))^2,x=-1..1));
evalf(%);

P := proc (x) options operator, arrow; 1-x^2 end proc

1/15*15^(1/2)/Pi*((31*Pi^3-960)/Pi)^(1/2)

.5068001193e-1

>    P:=x->0.9706-0.9755*x^2;
sqrt(int((P(x)-cos(Pi*x/2))^2,x=-1..1));

P := proc (x) options operator, arrow; .9706-.9755*x^2 end proc

.3594027183e-1

>    P:=x->0.9802-1.0306*x^2;
sqrt(int((P(x)-cos(Pi*x/2))^2,x=-1..1));

P := proc (x) options operator, arrow; .9802-1.0306*x^2 end proc

.2441450423e-1

>   

Having a way to measure distance, the next important idea in this section is that of the dot product. Dot products are historically connected with angle measure. First, we say what a dot product is.

Definition:  The dot product , or inner product , of vectors x  and y,  often denoted by < x, y  >, is a real- or complex-valued function with these properties:

(1) if x  is in the space and x  is not zero, then < x, x  > is positive,

(2) if x  and y  are in the space, then < x , y  > = < y , x  >*, where * denotes complex conjugate, and

(3) if x , y , and z  are in the space and a  is a number, then

               <   a x + y , z > = a < x , z > + < y , z >.

The usual dot product in   R^3  is defined as < x , y > = x[1]*y[1]+x[2]*y[2]+x[3]*y[3]  .

The usual dot product in  C([ 0, 1]) is defined as < f , g > = int(f(x)*g(x),x = 0 .. 1) .

A dot product for  a subclass of C( [0, infinity ) ) can be also defined by an integral with a weighting function,

               < f , g > = int(f(x)*g(x)*exp(-x),x = 0 .. infinity) .

Question:  Determine the dot product of vectors [1, -1, 1] and [1, 2, 1] in R^3  with the usual dot product,

the dot product of x^2  and sin( 2 Pi  x) in C( [0 , 1] ) with the usual dot product, and

the dot product of   1 - x, and 2 - 4 x  + x^2  with the third dot product presented for C( [0, infinity ) ).

The Answer Using Maple

With the first problem, we can construct the answer with Maple.

>    u:=[1,-1,1]; v:=[1,2,1];

u := [1, -1, 1]

v := [1, 2, 1]

>    dot_product:=add(u[i]*v[i],i=1..3);

dot_product := 0

Or, we can let Maple do the computations.

>    DotProduct(Vector(u),Vector(v));

0

With the second problem, we construct an integral.

>    int(x^2*sin(2*Pi*x),x=0..1);

-1/(2*Pi)

We do the same thing for the third problem: construct an integral.

>    f:=x->1-x;
g:=x->2-4*x+x^2;

f := proc (x) options operator, arrow; 1-x end proc

g := proc (x) options operator, arrow; 2-4*x+x^2 end proc

>    int(f(x)*g(x)*exp(-x),x=0..infinity);

0

>   

There are two important ideas that are associated with the dot product. One of these ideas has strong geometric implications and will be at the core of the ideas in the course. The other connects the dot product with the above notions of norm and distance.

Idea 1:  The dot product is connected with angle measure  in the following way. If u  and v  are two vectors in any linear space on which there is defined a dot product, then the angle theta  between u  and v  is defined as follows:

                                   cos( theta )  = `<`*u*`,`*v*`>`*` `/(abs(u)*abs(v))  .

With this agreement for what angle measure would be in linear spaces, we would say that the two vectors in the first part and the last part of the previous question are perpendicular.

Idea 2:  Every linear space with a dot product inherits an associate norm from the dot product. Namely, the norm associated with the dot product  is

                                   || x || = sqrt(`<`*x*`,`*x*`>`)  .

We have already seen that every linear space on which there is a norm inherits an associate distance formula from the norm:

                                   d( x, y ) = || x - y  ||.

We now have the basic underlying structure for the material of a large body of Mathematics. A basic underlying structure is a pair of objects: {S, < *, * > }-- a linear space S and a dotproduct defined on that linear space. This construction gives rise to a host of mathematical ideas commonly called Finite and Infinite Dimensional Inner Product Space . The literature is filled with studies of the properties of these objects. To get a glimpse of associated ideas, see the author's web based notes on this subject at  http://www.math.gatech.edu/~herod.

>   

EMAIL: herod@math.gatech.edu   or    jherod@tds.net

URL: http://www.math.gatech.edu/~herod

Copyright ©  2003  by James V. Herod

All rights reserved