|x|
x if x>=0-x if x<0
The expression |x| denotes the absolute value of the number x. The absolute value of a number is the distance of that number from zero on the number line. Thus, if x is a positive number, |x| is simply equal to x. If x is negative, |x| is equal to the opposite of x, which is positive. For example, |5| is 5 and |-5| is also 5, since -5 is 5 units away from zero on the number line, in the opposite direction of positive 5. The absolute value function is useful in many mathematical contexts, such as solving equations, finding distances, and calculating magnitudes.
More Answers:
[next_post_link]