LINEAR TRANSFORMATIONS
 

Identity Matrix
Inverse Matrix
Product of a Matrix and a Vector
Rotations
Rotation-Dilations
Orthogonal Projections
Reflections
Determinant and Inverse of a 2x2 Matrix
Matrix Products
Reflections
How to Examples Exercise
How to:
Just like in
last section, we are going to work with u, a unit vector, L, a line which is an extension of u, and also v, which is another vector not on L (otherwise the reflection would be trivial).

The formula for finding a reflection vector, refLv (read as the reflection of v in L), is:
     refLv = 2*dot(u, v)*u - v
You'll notice that dot(u, v)*u is just the vector projLv from last section. So, if you've already found projLv, you can more simply type:
     refLv = 2*projLv - v
    

Examples:
Let's work again with u = [1; 0] and v = [3; 5]. L is again the entire X-axis. Now, we already found projLv to be the vector [3; 0], so we can find refLv either way:
     refLv = 2*dot(u, v)*u - v OR
     refLv = 2*projLv - v
Either way, MATLAB returns to us, that our reflection vector is indeed, refLv = [3; -5].


Exercise: