# IvI vs IIvII

This topic is 4156 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

in all my pgraphic programming books the length of a vector is written as ||v|| bbut in my regular math books its written as just the absolute value |v| which one is correct and why?

##### Share on other sites
Both are correct. In my experience ||x|| is used when you're taking the magnitude of a vector, and |x| is used for scalars, but I've also seen |x| used on vectors without any ambiguity. I personally use |x| all around just because all those extra vertical lines can be a bit verbose. Imagine writing out the dot product ||x||||y||cos(θ). You can barely read it.

It's really just a matter of notational preference, the same way mathematicians use i for the imaginary root while engineers use j.

##### Share on other sites
Double bars are often used to indicate a matrix norm, with single bars used for a vector. Often the bars will be accompanied by a subscript to indicate the type of norm, e.g., you might see:

|x|2

for the L-2 norm.

Zipster is correct, though. Often you might see these interchanged in different books or references. Best to read the up-front material, since most books will define what this book means by double or single bars.

• 33
• 12
• 10
• 9
• 9
• ### Forum Statistics

• Total Topics
631352
• Total Posts
2999484
×