^ is the 'xor' operator in c++, not what you expected. pow(some_mat, number);
seems more appropriate
also normalize() is used to make a unit vector, and takes a src and a dst Mat, instead you probably wanted norm(p_light - focus); // the norm of the diff
(can it be you meant opengl, not opencv ?)
[edit]
was pretty blind yesterday, your formula is just the unit-length (p_light - focus) vector, so :
Vec3f v = p_light - focus;
Vec3f l_ik = v / norm(v);