Functions & Programming Concepts · Level 2 of 5
Mapping
An association from elements of one set to elements of another.
In mathematics a function is a single-valued mapping.
Example
Each city name is associated with a country code.
Listen to the definition and example
Audio transcript
Mapping. An association from elements of one set to elements of another. In mathematics a function is a single-valued mapping. For example: Each city name is associated with a country code.
Explore this concept
Why it matters
This helps you distinguish a computation’s contract, inputs, outputs, and behavior.
Start with
Related concepts
Quick recall question
Try answering before looking back at the definition.