# Dot product rules

What am I doing wrong here?

$(n^Tv)^2=(n^Tv)^T(n^Tv)=(v^Tn)(n^Tv)=v^T(nn^T)v=v^Tv$

$v$ is a 3d vector and $n$ is a 3d normal vector. From this calculation it looks like the projection length squared $(n^Tv)^2$ is independent of $n$, which is of course not true.

-
$nn^T\ne1$, rather it is a $3\times 3$ matrix ($ne I_3$). –  Tapu Jan 7 '12 at 11:25
$nn^T\ne1$, rather it is a $3\times 3$ matrix ($\ne I_3$).
In your equation $nn^T$ is an outer product and not an inner product. Therefore, you can't replace $v^T (nn^T) v$ with $v^Tv$.