How do I find the magnitude of a vector?

1 Answer

The magnitude of a vector in RR^n (if you're using dot product as inner product) is given by the square-root of the sum of the square of each coordinate of the vector.

Let v = [v_1,v_2,v_3,v_4]:
The magnitude of v is sqrt((v_1)^2+(v_2)^2+(v_3)^2+(v_4)^2)//

For a more general RR^n vector u = [u_1,u_2,...,u_n], its magnitude is given by sqrt((u_1)^2+(u_2)^2+...+(u_n)^2)//

Hope it helps