10 7 General vector spaces

Proposition & Definition 7.14. of n(R) P Letn N 0. The particular polynomialsm 0,m 1,...,m n n(R) defined by ∈ ∈P n 1 n m0(x) = 1,m 1(x) = x, . . . ,m n 1(x) =x − ,m n(x) =x for allx R − ∈

are called . The family =(m 0,m 1,...,m n) forms a basis of n(R) B P and is called the monomial basis. Hence dim( n(R)) =n+1. P

Corollary 7.15. The method of equating the coefficients Letp andq be two real with degreen N, which means ∈ n n p(x) =a nx +...+a 1x+a 0 andq(x) =b nx +...+b 1x+b 0

for some coefficientsa n, . . . , a1, a0, bn, . . . , b1, b0 R. ∈ If we have the equalityp=q, which means

n n anx +...+a 1x+a 0 =b nx +...+b 1x+b 0, (7.3)

for allx R, then we can concludea n =b n, . . . , a1 =b 1 anda 0 =b 0. ∈

VL18 ↓ Remark:

Since dim( n(R)) =n+1 and we have the inclusions P

0(R) 1(R) 2(R) (R) (R), P ⊂P ⊂P ⊂···⊂P ⊂F we conclude that dim( (R)) and dim( (R)) cannot befinite natural numbers. Sym- P F bolically, we write dim( (R)) = in such a case. P ∞ 7.4 Coordinates with respect to a basis 11

7.4 Coordinates with respect to a basis

7.4.1 Basis implies coordinates

Again, we deal with the caseF=R andF=C simultaneously. Therefore, letV be an F- with the two operations+ and . Let alson := dim(V)< and choose · ∞ a basis =(b 1,...,b n) ofV. B Since is a generating system and linearly independent, eachv fromV has a linear B combination

v=α 1b1 +...+α nbn (7.4) where the coefficientsα 1,...,α n F are uniquely determined. We call these numbers ∈ the coordinates ofv with respect to the basis and sometimes writev B for the vector B consisting of these numbers:

n A vectorv inV and its coordinate vectorv B inF

α1 . n v=α 1b1 +...+α nbn V v B = . F . (7.5) ∈ ←→  .  ∈ αn   Whenfixing a basis inV , then each vectorv V uniquely determines a coordinate n B ∈ vectorv B F – and vice versa. ∈ Forming the coordinate vector is a linear map The translation of a vectorv V into the n ∈ coordinate vectorv B F defines a linear ∈ map: vector spaceV n Φ :V F ,Φ (v)=v B B → B 1 Φ Φ− More concretely: B  � B     Φ (α1b1 +...+α nbn) =α 1e1 +...+α nen   B vector� space F n For allx,y V andλ F, the mapΦ sat- ∈ ∈ isfies two properties:

Φ (x+y)=Φ (x) +Φ (y) (+) B B B Φ (λx) =λΦ (x) ( ) B B · α1 . n v=α 1b1 +...+α nbn V Φ (v)= . F . (7.6) ∈ ←→ B   ∈ αn The linear mapΦ is called the basis isomorphism with respect  to the basis and B B is completely defined byΦ(b j) =e j forj=1, . . . , n. 12 7 General vector spaces

Example 7.16. An abstract vector is represented by numbers The three functions sin, cos and arctan from the vector space (R), cf. Example 7.4, F span a subspace: V := Span(sin, cos, arctan) (R). ⊂F In the same manner as before, we can show that the three functions are linearly independent. Hence, they form a basis ofV:

:= (sin, cos, arctan). B Now, if we look at another functionv V given by ∈ v(x) = 8 cos(x) + 15 arctan(x) for allx R, hencev=8 cos + 15arctan. ∈ Then:

v=8 cos + 15arctan

arctan sin cos Wefind v=8 cos + 15arctan directly by using its coordinates: 0 Φ (v)= 8 . B �15�

Rule of thumb:V is completely represented byF n EachF-vector spaceV withn := dim(V)< is represented byF n if youfix a basis =(b ,...,b ) ∞ B 1 n For each vectorv V , there is exactly one coordinate vectorΦ (v) F n. Instead ∈ B ∈ α1 . n of usingv V , one can also do calculations withΦ (v)= . F . ∈ B   ∈ αn   7.4 Coordinates with respect to a basis 13

3 2 Example 7.17. The polynomialsp,q 3(R) given byp(x) = 2x x + 7 andq(x) = 2 ∈P − x +3 can be represented with the monomial basis =(m 0,m 1,m 2,m 3) by the coordinate B vectors:

1 2 2 2 Example 7.18. The matrixA= R × has the following coordinate vector with 0 3 ∈ respect to the basis from equation ( 7.1): B � � 1 Φ (A) = 2 . B �3�

3 The matrix3A has the coordinate vector 6 . �9� The matrix 5 0 5 C= 0 2 0   5 0 5  

7.4.2 Change of basis

For a given basis =(b 1,...,b n) of the vector spaceV , we have the linear map B

n Φ :V F ,Φ (bj) =e j for allj B → B 14 7 General vector spaces

which is also invertible. We have called it the basis isomorphism. For a given element v=α 1b1 +...+α nbn, we can write:

1 1 1 v=α 1b1 +...+α nbn =α 1Φ− (e1) +...+α nΦ− (en) =Φ − (Φ (v)). B B B B

1 n 1 Φ− :F V,Φ − (ej) =b j for allj B → B

Example 7.19. Consider the already introduced monomial basis =(m 2,m 1,m 0) = 2 B (x x , x x, x 1) of the space 2(R) and the polynomialp 2(R) defined by �→ �→ �→ P ∈P p(x) = 4x2 + 3x 2. Then: − 4 1 1 p=Φ − 3 =Φ − (Φ (p)), sincep=4m 2 + 3m1 2m 0. B � 2� B B − − 1 0 3 Example 7.20. LetV=R 2 and choose the basis =( , ). The vectorx= V B 1 1 7 ∈ can then be represented as: � � � � � �

3 1 0 1 0 3 1 x= = 3 + 4 = =Φ − (Φ (x)) 7 1 1 1 1 4 B B � � � � � � � � � �

Now, let =(c 1,...,c n) be another basis ofV. C

Question: Old versus new coordinates How to switch between both coordinate vectors?

α1 α1� . ? . -coordinatesΦ (v)= . -coordinatesΦ (v)= . B B   ←→C C   αn αn�     V 1 1 Φ− Φ− B ? C Fn Fn ? 7.4 Coordinates with respect to a basis 15

n n 1 To get the map from “left to right” byf:F F ,f :=Φ Φ − . More concretely for n → C ◦ B all canonical unit vectorse j F , we get: ∈

1 f(e j) =Φ (Φ− (ej)) =Φ (bj) (7.7) C B C

Sincef is a linear map, wefind a uniquely determined matrixA such thatf(x) =Ax for allx F n. This matrix is determined by equation 7.7 and given a suitable name: ∈ Transformation matrix

n n T := Φ (b1) Φ (bn) F × (7.8) C←B  C ··· C  ∈   The corresponding linear map gives us a sense of switching from basis to the basis . B C Also a good mnemonic is:

1 1 n Φ− T x=Φ − x for allx F (7.9) C C←B B ∈

Now, if we have a vectorv V and its coordinate vectorΦ (v) andΦ (v), respectively, ∈ B C then we can calculate:

1 T Φ (v)=Φ (Φ− (Φ (v))) =Φ (v). C←B B C B B C

Wefix our result: Transformation formula

Φ (v) =T Φ (v). (7.10) C C←B B

v V ∈ 1 1 Φ− Φ− B T C C←B Φ (v) F n Φ (v) F n B ∈ T C ∈ B←C

1 T = (T )− . (7.11) B←C C←B 16 7 General vector spaces

Rule of thumb: How to get the transformation matrixT C←B The notationT means: We put the vector in -coordinates in (from the right) C←B B and get out the vector in -coordinates. To get the transformation matrixT C C←B write the basis vectors of in -coordinates and put them as columns in a matrix. B C

Example 7.21. We already know the basis

=(m ,m ,m ) = (x x 2, x x, x 1) B 2 1 0 �→ �→ �→ =:b 1 =:b 2 =:b 3

in 2(R). Now, we can easily���� show���� that���� P =(m 1 m ,m + 1 m ,m ). C 2 − 2 1 2 2 1 0 =:c 1 =:c 2 =:c 3 ���� defines also a basis of 2(R). Now� �� we know� � how�� to� change between these two bases. P Therefore, we calculate the transformation matrices. Thefirst thing you should note is that the basis is already given in linear combinations of the basis vectors from . Hence C B we get:

1 1 0 1 1 = T = /2 /2 0 . B←C   ⇒ −0 0 1  

1 By calculating the inverse, we get the other transformation matrixT = (T )− : C←B B←C 1 /2 1 0 1 − T = Φ (b1) Φ (b2) Φ (b3) = /2 1 0 C←B  C C C    0 0 1     For an arbitrary polynomialp(x) = ax 2 + bx+c with a, b, c R, we get: ∈ 1 a /2 1 0 a /2 b 1 − a − Φ (p) =T Φ (p) = /2 1 0 b = /2 +b . C C←B B       0 0 1 c c       7.4 Coordinates with respect to a basis 17

Hence, for our examplep(x) = 4x 2 + 3x 2,a=4,b=3 andc= 2, we get: − − 4 /2 3 1 4 − − Φ (p) = /2 + 3 = 5 . C     2 2 − −     Let us check again if this was all correct: ( 1) (x2 1 x) +5 (x2 + 1 x) +( 2) 1 = ( 1 + 5)x2 + ( 1 + 5 )x+( 2)1 = 4x 2 + 3x 2. − − 2 2 − − 2 2 − − c3(x) c1(x) c2(x) � �� � � �� � ����

1 3 1 2 Example 7.22. Now, we look atR 2 with the two bases =( , ) and =( , ). B 2 4 C 0 2 � � � � � � � �

V=R 2 1 1 1 Φ− = id Φ− Φ− E B ? C R2 R2 R2 ?

1 3 1 2 T = andT = . E←B 2 4 E←C 0 2 � � � � Now, for gettingT , we have to combine: C←B 1 T =T T = (T )− T . C←B C←E E←B E←C E←B

1 2 1 3 1 0 1 1 (T T ) (1 T ), so − − . E←C | E←B | C←B 0 2 2 4 0 1 1 2 � � � � � � 18 7 General vector spaces

Question: Can we do a similar thing in the polynomial space? Consider bases and B C that is not the simple monomial basis:

= (2m 1m , 8m 2m ,1m + 4m + 1m ) B 2 − 1 − 1 − 0 2 1 0 =:b 1 =:b 2 =:b 3

and = (1m 1 + 1m0,2m 2 + 2m1,1m 2 + 1m0). C � �� � � �� � � �� � =:c 1 =:c 2 =:c 3 � �� � � �� � � �� � Answer: Yes, we can do the same by adding the the monomial basis (or a other well-known basis) in the middle. We call the monomial basis by , which means = A A (m2,m 1,m 0). ThenT andT are immediately given: A←B A←C

2 0 1 0 2 1 T = 1 8 4 andT = 1 2 0 , A←B   A←C   −0 −2 1 1 0 1 −     and then we getT : B←C

T by using an additional “nice” basis B←C A

T =T T A←C A←B B←C 1 T T and henceT = (T )− T . Φ (x) A←B Φ (x) B←C Φ (x) B←C A←B A←C A �−→ B �−→ C

Since we again have tofind an inverse of a matrix, we can use the Gauß-Jordan algorithm again:

(T T ) (1 T ). (7.12) A←B | A←C | B←C � For our example, this gives us:

2 0 1 0 2 1 1 0 0 3 2 4 − 1 8 4 1 2 0 0 1 0 7/ 3 4 .    2  −0 −2 1 1 0 1 0 0 1 − 6 6−7 − � − −     The boxed matrix is indeedT . B←C 7.4 Coordinates with respect to a basis 19

Change of basis for audio: WAV vs. MP3 Assume you have an audio signalf given at finite time stepst=1,2, ..., 50 (e.g. milli- f= 1 2 3 50 seconds). Hence, you have some measure val- uesf 1, f2, . . . , f50 R. ∈ b1: 1 At this point you know that the audio sig-

1 nalf is a vector in a 50-dimensional space,

b2: 1 which can be represented with respect to the 50 2 canonical basis =(b 1,...,b 50) ofR . B . The coordinates off are exactly the values b . 1 50: f1, f2, . . . , f50. For describing tones (so os- 50 cillations) this basis is not optimal! We want to change to a basis ofR 50, which is betterfitting for tones. C Sine waves Cosine waves no oscillation c25: 1 2 3 50

1 oscillation 1 oscillation c1: c26: 1 2 3 50 1 2 3 50

2 oscillations 2 oscillations c2: c27: 1 2 3 50 1 2 3 50

3 oscillations 3 oscillations c3: c28: 1 2 3 50 1 2 3 50

. . . . 24 oscillations 24 oscillations c24: c49: 1 2 3 50 1 2 3 50

25 oscillations c50: 1 2 3 50 20 7 General vector spaces

One can show: =(c 1,...,c 50) is also linearly independent and hence a basis of C R50.

f= 1 2 3 50

The signalf from above has the following form:

f=c c + 3c + 1 c . 3 − 25 26 4 40

We reckon that most signalsf are a superposition of some “basic tones”c i.

Compression: One stores only the coordinates inΦ (f). One can also focus on C the (for humans) important frequencies and ignore the higher and lower ones (e.g. MP3file format). All this saves storage space instead of storing the coordin- T atesΦ (f)=(f 1, . . . , f50) (e.g. WAVfile format). Similar ideas exist for two- B dimensional signals like pictures: BMP vs. JPG. ⇒ Information: The change of basis from to is important for a lot of applications B C and known as the Fourier transform. We will consider it in more detail in the analysis lecture.

7.5 General vector space with inner product and norms

Recall that in the vector spacesR n andC n, besides the algebraic structure given by

vector addition+ and the scalar multiplication , · we also defined a geometric structure by choosing

an inner product , and also a norm �· ·� �·� for measuring angles and lengths. Attention! Convention forF=R andF=C Since we handle the casesF=R andF=C simultaneously, we also use the notion of the complex conjugation in the real case. Hence, forα F we write: ∈ α if = , α := F R α ifF=C (complex conjugate number). � m n Analogously, for a matrixA F × with m, n N: ∈ ∈ AT ifF=R (transpose), A∗ := A∗ ifF=C (adjoint). �