@Lites, you must be a lot more specific in the wording of your question.
Really neither of those is correct without further qualifications.
For example if you have a vector in say then its length is .
That is close to your first example.
Your second looks like your using the law of cosines.
So, please try to clarify what you are asking.