Mathematical function
A mathematical function is a mapping that assigns exactly one output to each permitted input in its domain.
Geometry for Programmers
A mathematical function is a relation that assigns exactly one output to each input in its domain.
- How it is used
- Frames coordinate-based geometry as rules that map inputs to outputs for transformations, fields, curves, and surfaces.
- How deep it goes
- Defines functions through relations, domain, codomain, range, and inverse sine, then applies their types and properties in geometry.
- Examples
- Uses sine and its inverse relation, a circle signed-distance expression, NumPy vectorization, and pixel-image interpolation into a smooth contour.
- What you can do after
- Apply it via Python, SymPy, and NumPy to express geometric rules and process scalar or array inputs.
Read how Geometry for Programmers explains mathematical function →
Unit Testing Principles, Practices, and Patterns
A mathematical function is a computation that maps each input to exactly one output without hidden inputs or outputs and produces the same output for a given input.
- How it is used
- Supports output-based unit testing by making behavior explicit, deterministic, and easy to verify.
- How deep it goes
- Defines purity, hidden inputs, and hidden outputs with code examples, but stops short of a deep functional-programming treatment.
- Examples
- Uses f(x) = x + 1, CalculateDiscount, deterministic Increment, stateful Increment, and AddComment to contrast explicit and hidden behavior.
- What you can do after
- Evaluate code for hidden inputs and outputs and design highly testable logic around explicit inputs and outputs.
Read how Unit Testing Principles, Practices, and Patterns explains mathematical function →
Related concepts
- geometric transformationincludes · A geometric transformation is a mapping or operation that changes or expresses the position, orientation, scale, shape, or coordinate representation of geometric objects.
- sine functionincludes · The sine function is a periodic trigonometric function that maps a real number or angle to a value between −1 and 1.
- relationkind of · A relation is a rule or set of associations that links elements of one set with elements of another set without requiring unique outputs.
- functional, stateless philosophyused by · Functional programming is a programming paradigm that expresses computation through the evaluation and composition of functions, typically favoring immutable data and minimizing mutable state and side effects.
- polynomial functionincludes · A polynomial function is a function expressible as a finite sum of constant multiples of nonnegative integer powers of one or more variables.
- inputuses · An input is a value, information, or signal supplied to a system, computation, or interface for processing or to influence its behavior.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

