Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Absolute values of variables

  1. Oct 4, 2005 #1
    so if |x|=(x,if x>=0, and -x, if x<0)
    then what would be like |x-7| be equal too and how do you do this i do not understand why |x|equals (x,if x>=0, and -x, if x<0) could you explain it to me?
  2. jcsd
  3. Oct 4, 2005 #2


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    That's the definition of |x|. Try plugging in a few actual numbers to get more comfortable with it.

    If f(x) = (x-3)²+4, do you know how to get f(x-7)? Why can't you do the same thing with |x|?
  4. Oct 4, 2005 #3
    Here are a couple examples.
    |8+x| equals {8+x if 8+x>=0, -(8+x) if 8+x<0}
    |x²-5| equals {x²-5 if x²-5>=0, -(x²-5) if x²-5<0}

    Like Hurkyl said above, plugging in numbers will help your understanding.
  5. Oct 4, 2005 #4


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Picture a number line.
    |x-8| is the distance from "8", which you can write in terms of x, as done above.

    Try it for |x-0| first.
  6. Oct 4, 2005 #5
    so basically|x| means the answer is like always positive so therefor there will be a possibility of where the x is negative or -x and positvie just x right? so |x| is like F(x) rite? and if you sub x-7 for f(x) you would get like in order for x to be the positive value it would have to be greater than 7 there for x>=7 and -x would be -x<7?

    did i get his right?
  7. Oct 5, 2005 #6


    User Avatar
    Gold Member

    Right, if you include 0 as a positive number. To avoid confusion about 0, you could also say that |x| is non-negative, which means |x| > 0.
    I don't really understand that. Perhaps x appearing both in the definition and your example is confusing - the two x's aren't being used in the same way. So let's just change (x - 7) to (y - 7). If you write |x| as f(x), |y - 7| would be f(y - 7); You're setting x = y - 7. Plug (y - 7) into your definition in place of x. It now says

    |y - 7| = (y - 7) if (y - 7) > 0; -(y - 7) if (y - 7) < 0.

    You already know that |y - 7| will be non-negative, remember. The definition tells you how to turn (y - 7) into a non-negative number.
    Let y = 0. (0 - 7) = -7. Plug this into your definition:

    |-7| = -7 if -7 > 0; -(-7) if -7 < 0.

    -7 < 0. So what does the definition tell you? |-7| = -(-7) = 7.
    Let y = 8. (8 - 7) = 1. Do the same thing.

    |1| = 1 if 1 > 0; -(1) if 1 < 0.

    1 > 0. So what does the definition tell you in this case? |1| = 1.
    The definition tells you more than that. But do you understand this part?
    The rule is pretty simple - you could say informally that if x is already non-negative, don't do anything to it; If x is negative, do what to it in order to make it non-negative?
    Last edited: Oct 5, 2005
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook