Skip to content
Glacius
FoundationsConcept reference

Function notation

A scalar function assigns exactly one scalar output to each allowed scalar input.

On this page 7 sections
  1. Overview
  2. A function is a rule with one output for each allowed input
  3. Replace every occurrence
  4. Check your understanding
  5. Key takeaway
  6. Sources & further reading
  7. Concept connections

01A function is a rule with one output for each allowed input#

A function is a rule with one output for each allowed input. If f(x)=2x+1f(x)=2x+1, the name is ff and the input placeholder is xx. The expression f(3)f(3) asks for the output at input 3.

For f(x)=2x+1f(x)=2x+1, replace xx by 3: f(3)=2(3)+1=7f(3)=2(3)+1=7. The parentheses in f(3)f(3) name the input; they do not mean ff multiplied by 3.

The plotted rule is f(x)=2x+1. Input 3 has output 7; the guides connect (3,7) to its input and output coordinates.The plotted rule is f(x)=2x+1. Input 3 has output 7; the guides connect (3,7) to its input and output coordinates.
Figure 1The plotted rule is f(x)=2x+1. Input 3 has output 7; the guides connect (3,7) to its input and output coordinates.
Link to this figure ↗Download SVGDownload PNG
Check your reasoning

If f(x)=2x+1f(x)=2x+1, what is f(4)f(4)?

Show answer and explanation
9

Substitute 4 for x: 2(4)+1=92(4)+1=9.

02Replace every occurrence#

Replace every occurrence. If g(t)=t+t+2g(t)=t+t+2, then g(3)=(3)+(3)+2=4g(-3)=(-3)+(-3)+2=-4. The variable can be tt or another letter; it still marks the input.

Check your reasoning

For g(t)=t+t+2g(t)=t+t+2, which expression gives g(5)g(5)?

  1. A5+t+25+t+2
  2. B5(5+2)5(5+2)
  3. C5+5+25+5+2
Show answer and explanation
5+5+25+5+2

Both occurrences of t receive the input 5.

03Check your understanding#

Check your reasoning

A sensor uses C(r)=3r2C(r)=3r-2 to convert a raw reading r. The raw reading is 4. What is the converted value?

Show answer and explanation
10

The raw input goes into r: C(4)=3(4)2=10C(4)=3(4)-2=10.

Key takeaway

To find f(a), put a wherever the rule uses its input.

  • Evaluate a scalar function at a supplied input

Sources & further reading

  1. [1]

Reference this concept

Link to this page, a section, or an individual figure.

Glacius. “Function notation.” Math behind ML. /learn/f-function