I have a set of column vectors $[v_1,v_2,v_3,...,v_k]$ and I want to get the orthonormal basis $P$ for the range of those vectors. I use modified Gram-Schmidt to do orthogonalization. If $v_3$ is a linear combination of $v_1$ and $v_2$, when we orthogonalize $v_3$, it will return a $0$-vector. My problem is when a vector should be regarded as numerically zero?
I tried to calculate the norm of the residual after subtracting the projections onto previous basis and compare it with the norm of $v_3$, if this ratio is less than some number (like 1%), then I can regard it as a $0$-vector. But this method doesn't work well. Is there anybody can help me with this? I prefer not to use SVD because it's too expensive and I need good accuracy as well as efficiency in this case. Thanks a lot!