A function in mathematics is like a machine that follows a specific rule. You put in an input value, and it gives you exactly one output value. Think of it as a rule that assigns to each input exactly one output. For example, if we have the function f of x equals two x plus one, when we input three, we always get seven as the output.
Functions use a special notation to clearly show the relationship between inputs and outputs. We write f of x equals three x minus two, where f is the function name, x is the input variable, and three x minus two is the rule. To evaluate a function, we substitute the input value. For example, f of four equals three times four minus two, which equals ten.
The key rule for functions is that each input must have exactly one output. This is called the one-to-one rule. For example, g of x equals x squared is a function because input three always gives output nine. However, the square root is not a function because input four could give output two or negative two. When one input has multiple possible outputs, it violates the function rule.