Lets look at how transformation matrices of a linear mapping T:V→W change if we change the bases in V and W.
Example:
Consider two ordered bases of V
B=(b1,b2,......,bn)
˜B=(~b1,~b2,......,~bn)
Consider two ordered bases of W
C=(c1,c2,......,cn)
˜C=(~c1,~c2,......,~cm)
Let A∈Rm×n be the transformation matrix from V→W with respect to basic B and C and ˜A∈Rm×n be the transformation matrix from V→W with respect to basis ˜B and ˜C.
We will find out how A and ˜A are related ie; how we can transform A to ˜A.
The transformation matrix ˜A=T−1AS
Here S∈Rn×n is the transformation matrix that maps coordinates with respect to ˜B into coordinates with respect to B and T∈Rm×m is the transformation matrix that maps coordinates with respect to ˜C into coordinates with respect to C.
Lets consider a transformation matrix with respect to the standard basis(B)
A=[1221]If we define a new basis in R2
S=[111−1]Then any vector in the new basis can be transformed with a new transformation matrix which is easier to work ˜A=S−1AS
˜A=[−1−1−11][1221][111−1]=[3001]
It is noted that we obtain a diagonal matrix which is easier to work than the original transformation matrix.
import numpy as np
B=np.array([[1,1],[1,-1]])
A=np.array([[2,1],[1,2]])
Ab=np.linalg.inv(B).dot(A.dot(B))
print("new transformation matrix in base B")
print(Ab)
o/p
new transformation matrix in base B [[3. 0.]
[0. 1.]]
import numpy as np
Bn=np.array([[1,0,1],[1,1,0],[0,1,1]])
Cn=np.array([[1,1,0,1],[1,0,1,0],[0,1,1,0],[0,0,0,1]])
A=np.array([[1,2,0],[-1,1,3],[3,7,1],[-1,2,4]])
print("Tranformation Matrix A defined in stardard basis")
print(A)
S=Bn
T=Cn
print("New Basis")
print(S)
print(T)
print("Tranformation matrix in New basis is")
An=A.dot(S)
An=np.linalg.inv(T).dot(An)
print(An)
o/p
Transformation Matrix A defined in standard basis [[ 1 2 0] [-1 1 3] [ 3 7 1] [-1 2 4]] New Basis-S
[[1 0 1] [1 1 0] [0 1 1]]
New Basis-T[[1 1 0 1] [1 0 1 0] [0 1 1 0] [0 0 0 1]] Transformation matrix in New basis is [[-4. -4. -2.] [ 6. 0. 0.] [ 4. 8. 4.] [ 1. 6. 3.]]
Example:
Given the linear transformation T(x,y,z,w)=(x+2y−z,x+w).Find the matrix representation of the above transformation. Find the matrix representation with respect to the bases B1={(1,0,0,0),(1,1,0,0),(1,1,1,0),(1,1,1,1)} for R4 and B2={(1,1),(1,0)} for R2
Transformation matrix in standard basis
A=[12−101001] New Basis transformation matrix
S=[1111011100110001]
New Basis transformation matrix
T=[1110]
Inverse of T is
T=[011−1]
˜A=[11120210]
Inverse of T is
T=[011−1]
So the transformation matrix in new basis is ˜A=T−1AS
˜A=[011−1][12−101001][1111011100110001]
Comments
Post a Comment