# Modulus clarification

1. Jan 31, 2006

### ElDavidas

hi

I've been reading through some notes and I can't see where a step comes from.

I understand that

$$|x| = \left\{\begin{array}{cc} x,& \mbox{ if } x\geq 0\\-x, & \mbox{ if } x \leq0 \end{array}\right$$

The equation I'm stuck on reads as

$$f(x) = 1 - | 1- x | \mbox{on} [-2,2]$$

$$= \left\{\begin{array}{cc} 2-x,& \mbox{ if } x\geq 1\\x, & \mbox{ if } x \leq 1 \end{array}\right$$

Can someone explain this step?

Last edited: Jan 31, 2006
2. Jan 31, 2006

### arildno

Well, when 1-x>=0, then |1-x|=1-x
Thus, when x<=1, we have f(x)=1-|1-x|=1-(1-x)=x

3. Jan 31, 2006

### HallsofIvy

The crucial point about an absolute value (modulus) is to determine when the quantity inside the modulus changes from negative to positive and vice-versa: and that occurs, of course, where it is equal to 0.

Since the quantity inside the absolute value is 1- x, that will be 0 when
1- x= 0 or when x= 1. That means we can write this as two separate functions for x< 1 and x> 1.

If x< 1, 1- x is positive and |1- x|= 1- x.
If x< 1, 1- |1- x|= 1- (1- x)= x.

If x> 1, 1- x is negative and |1- x|= -(1- x)= x- 1. If x> 1, 1- |1- x|=
1-(-(1-x))= 1+ 1- x= 2- x.

If x= 1, of course 1-x= 0 so 1- |1-x|= 1. which is correct for either of the formulas so it doesn't matter where you put the "equals".