Skip to content

Instantly share code, notes, and snippets.

@fospathi
Last active March 3, 2020 03:06
Show Gist options
  • Save fospathi/fd512bebff118df5d2c02055e43d936d to your computer and use it in GitHub Desktop.
Save fospathi/fd512bebff118df5d2c02055e43d936d to your computer and use it in GitHub Desktop.
Change of basis transformation
Consider a standard coordinate system C in three dimensions. Let a linear transformation R be any rotation or reflection
around or through the origin respectively.
Let R be applied to the orthonormal basis vectors that define the axis directions of C. Let R be applied to any points
in C, say P₀ and P₁.
R: C → C'
R: P₀, P₁ → P'₀, P'₁
A new coordinate system C' results whose axis directions are the transformed axis directions of C under the
transformation R. The points P'₀, P'₁ will have the same coordinates in C' as they had in C since the transformed
points did not move relative to the transformed basis vectors.
To distinguish between coinciding points in different coordinate systems let P'₀, P'₁ in C be designated Q₀, Q₁ in C'.
Also let P₀, P₁ in C be designated Q'₀, Q'₁ in C'.
Suppose we wish to discover the coordinates of the points P₀, P₁ in C', that is we wish to find Q'₀, Q'₁.
Let R⁻¹ be the inverse of the transformation R. We note that R⁻¹ transforms P'₀, P'₁ to P₀, P₁ and therefore transforms
Q₀, Q₁ to Q'₀, Q'₁. Since Q₀, Q₁ have the same coordinates in C' as P₀, P₁ in C, to find Q'₀, Q'₁ we simply need to
apply R⁻¹ to P₀, P₁. Let P and Q' represent the same point but in C and C' respectively, then
R⁻¹: P → Q' (Trivially, we can also say R: Q' → P)
The columns of the matrix R are the basis vectors of C' in C
let R = |a d g| then |1| |1| |a|, |0| |0| |d|, |0| |0| |g|
|b e h| |0|→ R|0|=|b| |1|→ R|1|=|e| |0|→ R|0|=|h|
|c f i| |0| |0| |c| |0| |0| |f| |1| |1| |i|
A matrix whose columns constitute an orthonormal basis is an orthogonal matrix. The inverse of an orthogonal matrix is
its transpose. That is
R⁻¹ = Rᵀ , and so
Rᵀ: P → Q'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment