Imagine you have a robot whose position is recorded as $t_1, t_2, t_3, \dots$ in its coordinate frame. Check the visualization here.
We can write down the robot's basis in our 2D image plane, i.e. the standard $R^2$ basis, as:
$$ B=\begin{bmatrix} 3 & 1 \\ 1 & 1 \\ \end{bmatrix} $$
Clearly, this transformation takes any vector from the robot's world to the image plane. For example, the robot's position at time $t_3 = \begin{bmatrix} 3, &3 \end{bmatrix}^T$ is:
$$ B \cdot t_3=\begin{bmatrix} 3 & 1 \\ 1 & 1 \\ \end{bmatrix} \cdot \begin{bmatrix} 3 \\ 3 \end{bmatrix} = \begin{bmatrix} 12 \\ 6 \\ \end{bmatrix} $$
Now, if we would want to transform the robot's trajectory by rotating it by 45 degrees, we could compose the needed rotation by using the next matrices:
- $B$, to get into the image frame;
- $R_{45} = \frac{1}{\sqrt{2}} \begin{bmatrix} 1 & -1 \\ 1 & 1 \\ \end{bmatrix}$, the rotation matrix in the standard $R^2$ basis, which is our image frame;
- $B^{-1}$, to get back to the robot's world.
When multiplied in the following order, $B^{-1}R_{45}B$, we get our rotation matrix for the robot's frame, $R'_{45}$:
$$ R'_{45} = B^{-1}R_{45}B =\frac{1}{\sqrt{2}} \begin{bmatrix} -1 & -1 \\ 5 & 3 \\ \end{bmatrix} $$
Now, we are able to recompute the route by applying $R'_{45}$ directly on $t_i$'s:
$$ R'_{45} \cdot t_3 =\frac{1}{\sqrt{2}} \begin{bmatrix} -1 & -1 \\ 5 & 3 \\ \end{bmatrix} \begin{bmatrix} 3 \\ 3 \end{bmatrix} = \sqrt{2} \begin{bmatrix} -3 \\ 12 \end{bmatrix} $$
The question is can we avoid computing $B^{-1}$ by utilizing the Gram-Schmidt process to compute the orthonormal basis? GS applied to $B$ gives us:
$$ B_{GS} = \frac{1}{\sqrt{10}} \begin{bmatrix} 3 & -1 \\ 1 & 3 \end{bmatrix} ,$$
and I know that $B_{GS}^{-1}$ in this case is just $B_{GS}^T$, which is super useful! However, I'm not sure how to use this freshly constructed basis to compute $R_{45}$ analog in the robot's world, and then apply it to the stored trajectory points.
Of course, inverting a $2 \times 2$ matrix is easy but I was just trying to come up with a simple example to show the benefits of using G-S. I was trying to do things analogously to the lecturer here: https://www.coursera.org/learn/linear-algebra-machine-learning/lecture/oXE0Y/example-reflecting-in-a-plane
– dimart.sp Apr 17 '19 at 10:37