 # What is a Function?

What is a function? A function is defined as a relation between a set of inputs having one output each. In simple words, a function is a relationship between inputs where each input is related to exactly one output. Every function has a domain and codomain or range. A function is generally denoted by f(x) where x is the input. The general representation of a function is y = f(x).

These functions are also classified into various types, which we will discuss here. Check Relations and Functions lesson for more information.

## What is a Function in Maths?

A function in maths is a special relationship among the inputs (i.e. the domain) and their outputs (known as the codomain) where each input has exactly one output, and the output can be traced back to its input.

## Types of Functions in Maths

An example of a simple function is f(x) = x2. In this function, the function f(x) takes the value of “x” and then squares it. For instance, if x = 3, then f(3) = 9. A few more examples of functions are: f(x) = sin x, f(x) = x2 + 3, f(x) = 1/x, f(x) = 2x + 3, etc.

There are several types of functions in maths. Some important types are:

• Injective function or One to one function: When there is mapping for a range for each domain between two sets.
• Surjective functions or Onto function: When there is more than one element mapped from domain to range.
• Polynomial function: The function which consists of polynomials.
• Inverse Functions: The function which can invert another function.

These were a few examples of functions. It should be noted that there are various other functions like into function, algebraic functions, etc.

Learn here all the functions:

## What is a Function in Algebra?

A function is an equation for which any x that can be put into the equation will produce exactly one output such as y out of the equation. It is represented as;

y = f(x)

Where x is an independent variable and y is a dependent variable.

For example:

• y = 2x + 1
• y = 3x – 2
• y = 4y
• y = 5/x

### What is a function on a graph?

A function f(x) can be represented on a graph by knowing the values of x. As we know, y = f(x), so if start putting the values of x we can get the related value for y. Hence, we can plot a graph using x and y values in a coordinate plane. Let us see an example:

Suppose, y = x + 3

Then,

• when x = 0, y = 3
• when x = -2, y = -2 + 3 = 1
• when x = -1, y = -1 + 3 = 2
• when x = 1, y = 1 + 3 = 4
• when x = 2, y = 2 + 3 = 5

Thus, with the help of these values, we can plot the graph for function x + 3.

## Recommended Videos

### Relations and Types of Relations ### Functions – Introduction, Co-domain and Range ### Functions and Types of Functions ### Range of Functions – Concepts & Questions ## Frequently Asked Questions on Function

Q1

### What is the definition of a function?

A function can be defined as a relation between a set of inputs where each input has exactly one output.

Q2

### How are functions represented?

A function is generally represented as f(x).

Q3

### What is the domain and codomain of a function?

A domain of a function is the set of inputs for which the function is defined. A codomain of a function is the set of possible output values.

Test your Knowledge on What is a Function