 If the Gram–Schmidt process is applied to a linearly dependent sequence, it outputs the 0 vector on the "i"th step, assuming that v"i" is a linear combination of .If an orthonormal basis is to be produced, then the algorithm should test for zero vectors in the output and discard them because no multiple of a zero vector can have a length of 1.The number of vectors output by the algorithm will then be the dimension of the space spanned by the original inputs.