What does it mean if a variable in a Mathematics formula is surrounded by two vertical lines?
According to WolframAlpha "
|z| is the absolute value of z."
I guess whether I take
|a| doesn't really matter, so I'll continue with
|a| as it seems more common.
In laymen terms this the statement from WolframAlpha means we're taking the actual value from
a while disregarding the algebraic sign (
a = -2.5 then
|a| represents the value
a = 3.14 then
|a| equals the value
You can see the two
| surrounding the variable name as some kind of programming function that returns the distance from
In-fact it exists in languages like
C# as the
But even if this function wouldn't exist in your programming language of choice you could implement it as
sqrt(a^2) (sqrt is the square-root).
a squared gets rid of the algebraic sign (22 and -2-2 are both 4). And the square root reverses the effect of the quadration without gaining back the algebraic sign.
In mathematical terms
|a| you may come across this notation described ast the
absolute value or
modulus of the real number
In case you're looking for a more exhaustive definition, I can recommend this 3 part video by Eddie Woo.