• Aucun résultat trouvé

Basis Change

Dans le document MACHINE LEARNING (Page 59-64)

Linear Algebra

2.7 Linear Mappings

2.7.2 Basis Change

In the following, we will have a closer look at how transformation matrices of a linear mappingΦ : V →W change if we change the bases inV and W. Consider two ordered bases

B= (b1, . . . ,bn), B˜ = (˜b1, . . . ,˜bn) (2.98) ofV and two ordered bases

C= (c1, . . . ,cm), C˜ = (˜c1, . . . ,˜cm) (2.99) of W. Moreover, AΦ ∈ Rm×n is the transformation matrix of the linear mappingΦ :V →W with respect to the basesBandC, andA˜ΦRm×n is the corresponding transformation mapping with respect to B˜ and C˜. In the following, we will investigate howAandA˜ are related, i.e., how/

whether we can transform AΦ into A˜Φ if we choose to perform a basis change fromB, C toB,˜ C˜.

Remark. We effectively get different coordinate representations of the identity mapping idV. In the context of Figure 2.9, this would mean to map coordinates with respect to(e1,e2)onto coordinates with respect to (b1,b2) without changing the vectorx. By changing the basis and corre-spondingly the representation of vectors, the transformation matrix with respect to this new basis can have a particularly simple form that allows

for straightforward computation. ♦

Example 2.23 (Basis Change) Consider a transformation matrix

A= 2 1

1 2

(2.100) with respect to the canonical basis inR2. If we define a new basis

B = ( 1

1

, 1

−1

) (2.101)

we obtain a diagonal transformation matrix A˜ =

3 0 0 1

(2.102) with respect toB, which is easier to work with thanA.

In the following, we will look at mappings that transform coordinate vectors with respect to one basis into coordinate vectors with respect to a different basis. We will state our main result first and then provide an explanation.

Theorem 2.20(Basis Change). For a linear mappingΦ :V →W, ordered bases

B = (b1, . . . ,bn), B˜ = (˜b1, . . . ,˜bn) (2.103) ofV and

C= (c1, . . . ,cm), C˜ = (˜c1, . . . ,˜cm) (2.104) ofW, and a transformation matrix AΦof Φwith respect toB and C, the corresponding transformation matrixΦwith respect to the basesandis given as

Φ=T−1AΦS. (2.105)

Here,S ∈Rn×n is the transformation matrix ofidV that maps coordinates with respect toonto coordinates with respect toB, andT ∈Rm×mis the transformation matrix ofidW that maps coordinates with respect toonto coordinates with respect toC.

Proof Following Drumm and Weil (2001), we can write the vectors of the new basisB˜ of V as a linear combination of the basis vectors ofB, such that

˜bj =s1jb1+· · ·+snjbn =

n

X

i=1

sijbi, j= 1, . . . , n . (2.106) Similarly, we write the new basis vectorsC˜of W as a linear combination of the basis vectors ofC, which yields

˜

ck=t1kc1+· · ·+tmkcm=

m

X

l=1

tlkcl, k= 1, . . . , m . (2.107) We define S = ((sij)) ∈ Rn×n as the transformation matrix that maps coordinates with respect to B˜ onto coordinates with respect to B and T = ((tlk))∈ Rm×mas the transformation matrix that maps coordinates with respect toC˜onto coordinates with respect toC. In particular, thejth column ofS is the coordinate representation of˜bj with respect toB and

2.7 Linear Mappings 55 thekth column ofT is the coordinate representation of˜ckwith respect to C. Note that bothSandT are regular.

We are going to look atΦ(˜bj)from two perspectives. First, applying the mappingΦ, we get that for allj= 1, . . . , n

where we first expressed the new basis vectors ˜ck ∈ W as linear com-binations of the basis vectors cl ∈ W and then swapped the order of summation.

Alternatively, when we express the ˜bj ∈ V as linear combinations of bj∈V, we arrive at where we exploited the linearity ofΦ. Comparing (2.108) and (2.109b), it follows for allj= 1, . . . , nandl= 1, . . . , mthat

which proves Theorem 2.20.

Theorem 2.20 tells us that with a basis change inV (Bis replaced with B˜) and W (C is replaced with C˜), the transformation matrixAΦ of a linear mappingΦ :V →W is replaced by an equivalent matrixA˜Φwith

Φ=T−1AΦS. (2.113)

Figure 2.11 illustrates this relation: Consider a homomorphismΦ :V → W and ordered basesB,B˜ ofV andC,C˜ ofW. The mappingΦCB is an instantiation ofΦand maps basis vectors of B onto linear combinations of basis vectors ofC. Assume that we know the transformation matrixAΦ

ofΦCB with respect to the ordered basesB, C. When we perform a basis change fromB toB˜ inV and from C toC˜ in W, we can determine the

Figure 2.11 For a we can express the mappingΦC˜B˜ with respect to the bases B,˜ C˜equivalently as a composition of the homomorphisms ΦC˜B˜ =

ΞCC˜ ΦCBΨBB˜

with respect to the bases in the subscripts. The corresponding transformation matrices are in red.

V W

corresponding transformation matrixA˜Φas follows: First, we find the ma-trix representation of the linear mappingΨBB˜ :V →V that maps coordi-nates with respect to the new basisB˜ onto the (unique) coordinates with respect to the “old” basisB (inV). Then, we use the transformation ma-trixAΦofΦCB :V →W to map these coordinates onto the coordinates with respect toC inW. Finally, we use a linear mappingΞCC˜ :W →W to map the coordinates with respect toConto coordinates with respect to C˜. Therefore, we can express the linear mappingΦC˜B˜ as a composition of linear mappings that involve the “old” basis:

ΦC˜B˜ = ΞCC˜ ◦ΦCB◦ΨBB˜ = Ξ−1CC˜◦ΦCB◦ΨBB˜. (2.114) Concretely, we useΨBB˜ = idV andΞCC˜ = idW, i.e., the identity mappings that map vectors onto themselves, but with respect to a different basis.

Definition 2.21(Equivalence). Two matricesA,A˜ ∈Rm×nareequivalent

equivalent

if there exist regular matrices S ∈ Rn×n and T ∈ Rm×m, such that A˜ =T−1AS.

Definition 2.22(Similarity). Two matrices A,A˜ ∈ Rn×n are similar if

similar

there exists a regular matrixS∈Rn×nwithA˜ =S−1AS

Remark. Similar matrices are always equivalent. However, equivalent

ma-trices are not necessarily similar. ♦

Remark. Consider vector spacesV, W, X. From the remark that follows Theorem 2.17, we already know that for linear mappingsΦ : V → W and Ψ : W → X the mapping Ψ◦ Φ : V → X is also linear. With transformation matricesAΦandAΨ of the corresponding mappings, the overall transformation matrix isAΨ◦Φ=AΨAΦ. ♦ In light of this remark, we can look at basis changes from the perspec-tive of composing linear mappings:

AΦ is the transformation matrix of a linear mapping ΦCB : V → W with respect to the basesB, C.

Φis the transformation matrix of the linear mappingΦC˜B˜ :V → W with respect to the basesB,˜ C˜.

S is the transformation matrix of a linear mapping ΨBB˜ : V → V (automorphism) that representsB˜in terms ofB. Normally,Ψ = idV is the identity mapping inV.

2.7 Linear Mappings 57 T is the transformation matrix of a linear mapping ΞCC˜ : W → W (automorphism) that representsC˜in terms ofC. Normally,Ξ = idW is the identity mapping inW.

If we (informally) write down the transformations just in terms of bases, then AΦ : B → C, A˜Φ : ˜B → C˜, S : ˜B → B, T : ˜C → C and T−1 :C→C˜, and

B˜ →C˜=B˜ →B→C→C˜ (2.115)

Φ=T−1AΦS. (2.116)

Note that the execution order in (2.116) is from right to left because vec-tors are multiplied at the right-hand side so thatx7→Sx7→ AΦ(Sx) 7→

T−1 AΦ(Sx)= ˜AΦx. Example 2.24 (Basis Change)

Consider a linear mappingΦ :R3R4whose transformation matrix is

AΦ=

with respect to the standard bases

B = (

We seek the transformation matrixA˜ΦofΦwith respect to the new bases

B˜ = (

where the ith column of S is the coordinate representation of ˜bi in terms of the basis vectors of B. Since B is the standard basis, the co-ordinate representation is straightforward to find. For a general basis B, we would need to solve a linear equation system to find theλi such that

P3

i=1λibi = ˜bj,j= 1, . . . ,3. Similarly, thejth column ofT is the coordi-nate representation of˜cjin terms of the basis vectors ofC.

Therefore, we obtain

Φ=T−1AΦS= 1

Dans le document MACHINE LEARNING (Page 59-64)