# Change of Basis Given two bases, $U$ and $V$, we can define two change of basis matrices: $C_{U \rightarrow V} = \begin{bmatrix} V(u_1) \;\; V(u_2)\end{bmatrix}$ $C_{V \rightarrow U} = \begin{bmatrix} U(v_1) \;\; U(v_2)\end{bmatrix}$ Here, $C_{U \rightarrow V}$ has columns that hold where the basis vectors of $U$ land when expressed in terms of $V$ (and vice versa). How you represent the same vectors will change resulting distances # Summary * We have **objects**. These exist in some [Space](Space.md). * Ex: a set of $N$ points living in $\mathbb{R}^d$ [Hierarchy of Vector Space Structures](Hierarchy%20of%20Vector%20Space%20Structures.md) # Overview Change of basis is best understood by first remembering the bigger picture. We have *objects*—things that exist in a space (such as $\mathbb{R}^n$). We would like a way to *describe* and talk about those objects. Coordinate systems are a great way to do that. We can think of a **basis** as a set of *building blocks*, from which we can construct *any element of the space* via [Linear Combination](Linear%20Combination.md) of the building blocks. ### Change of Basis and Matrices Any invertible matrix $A$ is the change of basis of the basis formed by the columns of $A$ (which is a basis because $A$ is invertible) to the canonical basis. ### An Example Consider the image below: ![](Change%20of%20basis%20_%20Chapter%2013,%20Essence%20of%20linear%20algebra%205-5%20screenshot.png) We have two basis: the canonical basis, $E$, which sets our gridlines, and a basis $B$, composed of basis vectors $b_1$ and $b_2$. We then have a vector $v$ in yellow. We see that $v$, a vector simply living in space, can be described in two ways: $[v]_E = \begin{bmatrix} -4 \\ 1\end{bmatrix}$ $[v]_B = \begin{bmatrix} -1 \\ 2\end{bmatrix}$ So, if you were using a basis of $B$ you would describe $v$ with the coordinates $[-1, 2]$. The question is, if you were using a basis of $E$ and someone said “I have a vector, $v$, described with respect to basis $B$”, how would you figure out where that vector lived with respect to your basis $E$? Well, it is actually pretty simple! You just need to: 1. Determine where the basis vectors of $B$, $b_1$ and $b_2$, are located in terms of your basis, $E$. Above we see that: $[b_1]_E = \begin{bmatrix} 2 \\ 1 \end{bmatrix} \;\; , \;\;\; [b_2]_E = \begin{bmatrix} -1\\ 1 \end{bmatrix} $ 2. And then simply use the original coefficients of $[v]_B$ in a linear combination with the basis vectors above (i.e. the basis vectors described wrt $E$). This means that the crux of the problem is as follows: > We must determine how to convert vectors described with respect to $B$ to be described with respect to $E$. And we just did that! Is there a general process that we could use though? There indeed is! We can use what is called a change of basis matrix! It is defined most generally as follows. Let us focus on the space $\mathbb{R}^2$. Let us have a basis $A$ and $B$: $A = \{ a_1, a_2\} \; , \;\; B = \{ b_1, b_2\}$ Where each vector simply lives in the ambient space of $\mathbb{R}^2$. At this point they have **no coordinates**! They couldn’t because coordinates are always defined wrt to a basis, and they *are* the basis! So it is important *not* to think that “ah, so $a_1$ lives at coordinates [blah, blah]”. They are simply mathematical objects that obey certain properties. Also, note we are no longer using $E$ to avoid making it seems as though we need one basis to be canonical. Okay, now if we have a vector, $w$ described in basis $A$ and we wish to describe it in terms of basis $B$, we can construct a change of basis matrix as follows: $[w]_B = \begin{bmatrix} | & | \\ [a_1]_B & [a_2]_B \\ | & | \end{bmatrix} [w]_A$ So to summarize as cleanly as possible: > We can represent a vector, $w$, that is currently described in terms of basis $A$, to be described in terms of basis $B$, by finding where the basis vectors of $A$ are in terms of basis $B$. This provides a matrix, the **change of basis** matrix. This matrix takes in vectors described via basis $A$ and returns vectors described via basis $B$. ### Intuition Think of it like this: you have a vector in ambient space. It is not moving or going anywhere. It is just sitting there. It is represented with a basis $A$, and it therefore has coordinates that are wrt $A$. We then want to represent it in terms of basis $B$. All we need to do is know where the basis vectors of $A$ (abstract vectors, *not* their coordinates per se) live in terms of $B$. In other words, using the basis vectors of $B$, how could we describe the basis vectors of $A$. Consider an analogy: We have the number $24$. It can be decomposed in a variety of ways: $24 = 12 \times 2 = 6 \times 4 = 8 \times 3 = 4 \times 3 \times 2 = \dots$ Above we are simply using different combinations of “building blocks” to *compose* $24$. This can, in a sense, be viewed as simply alternative ways of ***describing*** $24$. It is the same concept with basis vectors. We have an **abstract mathematical object**, some vector. We then *describe* it (composition) in terms of other vectors (building blocks). We may wish to describe it with respect to certain sets of building blocks rather than others. In that case, we can change between descriptions if we simply know how one set of building blocks is represented in terms of the other. --- Date: 20220115 Links to: [Rotation and Change of Basis](Rotation%20and%20Change%20of%20Basis.md) Tags: References: * Tons of notes in filing cabinet * Search basis in notability * [linear algebra - Is every invertible matrix a change of basis matrix? - Mathematics Stack Exchange](https://math.stackexchange.com/questions/1151041/is-every-invertible-matrix-a-change-of-basis-matrix)