Basis and Change of Basis
My learning notes.
import matplotlib.pyplot as plt
import numpy as np
Basis
Basis is a coordinate system used to describe a vector space or a set of vector. Any vector in this coordinate system can be created using the weighted
linear combination of the basis vectors.
To be considered as basis vector, a set of vectors:
- must span the entire space
- must be linearly independent
NOTE
: Span of the set of vectors is all the points we can reach by the weighted linear combination of the vectors in the set. If the set of vectors are not linearly independent then there is a redundant vector which can be removed and we can still reach all the points in the span.
So, If we have a set of vectors with which we can reach all the points in the span of the basis vector without having any redundant vector in the set, it can be called Basis
.
- Every vector in the space if the unique combination of the basis vectors.
- The size of the basis vector set is the dimension of the space.
- There are two basis vectors in R2 (corresponding to the x and y-axis in the Cartesian plane), or three in R3.
- If the number of vectors in a set is larger than the dimensions of the space, they can’t be linearly independent.
- If a set contains fewer vectors than the number of dimensions, these vectors can’t span the whole space.
- In a cartesian plane, basis vectors are the the orthogonal unit vectors: genrally denoted as
i
andj
.
NOTE
: Basis vectors can be orthogonal because orthogonal vectors are independent. However, the converse is not necessarily true: non-orthogonal vectors can be linearly independent and thus form a basis (but not a standard basis).
Change of Basis
Change of basis can be used to go from one basis to another i.e from one set of basis vectors to another set.
NOTE:
Change of basis vs linear transformation The difference between change of basis and linear transformation is conceptual. Sometimes it is useful to consider the effect of a matrix as a change of basis; sometimes you get more insights when you think of it as a linear transformation. Either you move the vector or you move its reference. This is why rotating the coordinate system has an inverse effect compared to rotating the vector itself. For eigendecomposition and SVD, both of these views are usually taken together, which can be confusing at first. Keeping this difference in mind will be useful throughout the end of the book. The main technical difference between the two is that change of basis must be invertible, which is not required for linear transformations.
# This means that if you go to 0.86757991i′−1.00456621j′ you arrive to the position (2, 1)
v_B1 = np.array([2, 1])
B_2 = np.array([
[0.8, -1.3],
[1.5, 0.3]
])
v_B2 = np.linalg.inv(B_2) @ v_B1
v_B2
B_2 @ v_B2