# Domain, Co-domain and Range of a Function

__Domain, Co-domain and Range of a Function__

A function f from a set P to a set Q, represented as f: P-> Q, is a mapping of elements of P (domain) to elements of Q(co-domain) in such a way that each element of P is assigned to some chosen element of Q. That is every element of **P must be assigned to some element of Q and only one element of Q****.**

**Domain:**

For a function, y = f(x), the set of all the values of x is called the domain of the function. It refers to the set of possible input values.

**Range:**

Range of y = f(x) is a collection of all outputs f(x) corresponding to each real number in the domain. Range is the set of all the values of y. It refers to the set of possible output values.

**For example**, consider the following relation.{(2, 3), (4, 5), (6, 7)}

Here Domain = {2, 4, 6}

Range = { 3, 5, 7}

Example

The domain of the function f : R → R defined by f (x) = √ (x^{2}-3x+2) is

Solution Here x^{2} – 3x + 2 ≥ 0

⇒ (x – 1) (x – 2) ≥ 0

⇒ x ≤ 1 or x ≥ 2

Hence the domain of f = (– ∞, 1] ∪ [2, ∞)

Example

If A = {1, 2, 3} and f, g are relations corresponding to the subset of A × A

indicated against them, which of f, g is a function? Why?

f = {(1, 3), (2, 3), (3, 2)}

g = {(1, 2), (1, 3), (3, 1)}

Solution f is a function since each element of A in the first place in the ordered pairs

is related to only one element of A in the second place while g is not a function because

1 is related to more than one element of A, namely, 2 and 3.