Stereo Wrote:The dot product should only produce a scalar, if you have W * W^T then W should be a 1x3 matrix, whereas W^T * W would use the 3x1 matrix. Both of those are W dot W; you transpose the one that makes sense.
Your projection function is just wrong; it should be (a dot b) * b / ||b||^2 to project a onto b. (note: this will produce a vector the same dimension as b, since (a dot b) is a scalar and so is ||b||)
In this case if you were projecting a=(2,1,2)' onto b=(1,1,1)'
so (a dot b) = 5, ||b||^2 = 3
5/3*(1,1,1)'
(not gonna do the actual question for you)
Actually that's another point. ||b||^2 is b dot b.
The 2-norm is sqrt(v_1^2+v_2^2+...+v_n^2), the square root of the sum of squares of each component. So squaring it you get ||v||^2 = v_1^2 + v_2^2 + ...
Which for ||(1,1,1)||^2 = 1^2 + 1^2 + 1^2 = 3 = (1,1,1) dot (1,1,1)
Wait, but I'm projecting v the (1,1,1) ONTO L which is (2,1,2).
And, I'm not sure I understand your projection equation. In a sense it makes sense compared to my text book. For clarity sake I took a picture of the problem, number 7, and the textbook definitions of the transformations.
Question 7
Orthogonal Projections
Reflections
EDIT: Ok I figured out why I am getting CLOSE to the answer, but not the actual answer. When I am subtracting my identity matrix I am not taking account the scalar being multiplied to A, which is really solving all my issues now.
instead of doing
(1/9)[8 4 8
4 2 4
8 4 8]
minus
(1/9)[9 0 0
0 9 0
0 0 9]
to account for the (1/9) term on the projection matrix I was just subtracting by 1. I feel so fucking dumb. Lordddddd, thank you [MENTION=128]Stereo[/MENTION] for the help!

