Jump to content
• Advertisement

#### Archived

This topic is now archived and is closed to further replies.

# Mathmatical Notation

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

If you intended to correct an error in the post then please contact us.

## Recommended Posts

Okay Dokey... I''m working my way through ''Elementary Linear Algebra'', with emphasis on Vectors in 2D and 3D space, in the attempt to understand all the code I have ''lifted'' over the past couple of years, and to reduce the number of dumb posts from me. Okay I know that ||v|| means normalise, but what about |v| ? as in : |ax0 + by0 + cz0 + d| The text book all of a sudden throws it in without an explanation. Any help would be appreciated. P.S. Just made me think, wouldn''t a glossary of symbolic notation be helpful for math newbies such as I? D.V. Carpe Diem

#### Share this post

##### Share on other sites
Advertisement
|x| means the absolute value of... or in programmers term

if (x<0) x=-x;

Billy - BillyB@mrsnj.com

#### Share this post

##### Share on other sites
Acctually |v| when refering to Vectors is the magnitude as in
sqrt((x*x)+(y*y)+(z*z))

#### Share this post

##### Share on other sites
Once again GDNet comes up trumps.

Thanks anons

D.V.

Carpe Diem

Edited by - DeltaVee on January 11, 2002 9:02:20 AM

#### Share this post

##### Share on other sites
Anonymous Poster...You where rigth both times...

|A| in any dimension sums up the square of the axis, and then takes the squareroot of them, to get the magnitude...

However, in 1D, it just happens the sqrt(a^2) is allways positive, since squared non-imaginary numbers allways >= 0

#### Share this post

##### Share on other sites
Oops, my bad :o) I forgot we were working with more than 1d, Anonymous Poster #2 was correct, sorry about that.

Billy

#### Share this post

##### Share on other sites
A little advanced mathematical notation stuff to confuse you all. In higher math (e.g., graduate school level math), the bar |?| or (more appropriate) double bar ||?|| notation simply indicates that you should calculate a "norm" of the item inside. For example,

B = |A|

means B equals a "norm" of A. It just happens that when A and B are vectors the most common "norm" is the Euclidian norm, the length of the vector A, which is calculated using the familiar formula:

B = Euclidian norm of A = sqrt(A.x2+A.y2+A.z2)

The Euclidian norm is sometimes called the "2-norm". That is because we add the components of A to the "2" power (squared) and then take the 1 over 2 (1/2 or sqrt) root of that sum. There is another norm called the "1-norm" and it is simply:

B = 1-norm of A = abs(A.x) + abs(A.y) + abs(A.z)

where abs() is absolute value (or same as |?| of a scalar)

Its computed kind of the same way as the 2-norm. Add the absolute value of components of A raised to the "1" power, and then take the 1 over 1 (=1) root of that sum. The root doesn''t do anything and you''re just left with the sum.

The 1-norm is cheaper to calculate than the 2-norm, and in some areas of math and geometry it is useful. There are really a whole bunch of different norms that are sometimes useful. The Euclidian norm, 1-norm, and the infinity-norm are perhaps the most common.

When you''re dealing with norms in higher math, it is customary to put a subscript outside of the |?| to indicate exactly which norm is desired, for example:

B = |A|2

Its also a bit more customary to use the double bars:

B = ||A||2

So, just a little trivia for you, .

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.

#### Share this post

##### Share on other sites
Doesn''t the |whatever| mean modulus?

#### Share this post

##### Share on other sites
quote:
Original post by Crazy_Vasey
Doesn''t the |whatever| mean modulus?

Not usually, but I have seen a|b used to mean a divides b, which is a related opreation to modulus.

#### Share this post

##### Share on other sites
the || is used for many stuff, depending on what ure working, ex vectors, matrices and so on...

#### Share this post

##### Share on other sites

• Advertisement
• Advertisement

• ### Popular Contributors

1. 1
2. 2
Rutin
20
3. 3
khawk
17
4. 4
A4L
14
5. 5
• Advertisement

• 12
• 16
• 26
• 10
• 44
• ### Forum Statistics

• Total Topics
633759
• Total Posts
3013715
×

## Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!