# Piecewise-Defined Functions

A piecewise fucntion exists when a function is defined by two or more different functions throughout its domain. The first step in evaluating a piecewise function is to determine which function definition applies depending on the value of x that is being input. Once that has been determined, we evaluate the function as usual by substituting in the given value of x.

**Example: **

## Absolute Value Functions

An absolute value function can be rewritten as a piecewise function. Absolute value is the distance from a number 'x' to 0 on the real number line. Therefore, when the value of a function is equal to zero or is positive, taking its absolute value doesn't change it; however, if the value is negative, taking absolute value changes the sign. Therefore, the definition of the function changes depending on whether or not x ≥ 0.

**Example 1:**

**Example 2:**

**Example 3:**