Which of the following best defines a function?

A function is a special type of relation for which there is a rule that pairs each input with exactly one output.

A function is a relationship that defines the connection between two variables.

A function is a set of ordered pairs in which no y-value repeats.

A function pairs input and output values with no particular pattern.