Presumably your class was using T to mean a vector-valued function, not just a vector, so it is not the case that T ⋅ T is necessarily a constant. If T ⋅ T does happen to be constant, for example if the value of T is always a unit vector, then the argument works and T' will be normal to T.