# Finding Domain and Range

Finding the domain and range of a function is a process that can often be done with algebra or with the aid of graphical means.

Formally, a **function** is a relation between a set of inputs (called the **domain**) that generate a particular set of outputs (called the **range**). For example, $f(x) = x^2$ has a domain of all real numbers (since any value of $x$ is possible) and a range of 0 and positive numbers (since the output cannot be negative).

#### Contents

## Domain Restrictions

In practice, domain is most commonly restricted by either a) division by zero or b) invalid input of square roots and logarithms.

For example, $f(x) = \frac{x+1}{x}$ cannot have an input of 0, since this causes the denominator to be 0. Hence the domain is all real numbers but 0.

If we assume real numbers only, $f(x) = \sqrt{x}$ has a domain of 0 and positive numbers, since taking the square root of a negative number is not possible in real numbers (although it is possible in complex numbers).

## Range Restrictions

The variety of circumstances range is restricted is larger than with the domain. Here is an example:

$f(x) = 5 ,$ the horizontal line at $y = 5 ,$ has only an output of $5,$ so that is the range. If a line is not horizontal, the range is all real numbers. We can justify this algebraically by starting at the $y = mx + b$ form and finding the inverse: swapping the $x$ and $y$ gets $x = my + b ,$ and isolating the $y$ gets $y = \frac{x-b}{m} ;$ division by zero only happens when $m = 0$ (that is, the original graph is a horizontal line!).

**Cite as:**Finding Domain and Range.

*Brilliant.org*. Retrieved from https://brilliant.org/wiki/finding-domain-and-range/