ArticleslgStudy

mathematics

Partial function

Partial function is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Partial function rather than just read about it. In short: In mathematics, a partial function f from a set X to a set Y is a function from a subset S of X (possibly the whole X itself) to Y. The subset S, that is, the domain of f viewed as a function, is called the domain of definition or natural domain of f.

Partial function — main illustration
Partial function — illustration

Key takeaways

  • Partial function belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Partial function to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Partial function from memory before moving on to harder problems.

Reference excerpt

In mathematics, a partial function f from a set X to a set Y is a function from a subset S of X (possibly the whole X itself) to Y. The subset S, that is, the domain of f viewed as a function, is called the domain of definition or natural domain of f. If S equals X, that is, if f is defined on every element in X, then f is said to be a total function. In other words, a partial function is a binary relation over two sets that associates to every element of the first set at most one element of the second set; it is thus a univalent relation. This generalizes the concept of a (total) function by not requiring every element of the first set to be associated to an element of the second set. A partial function is often used when its exact domain of definition is not known, or is difficult to specify. However, even when the exact domain of definition is known, partial functions are often used for simplicity or brevity. This is the case in calculus, where, for example, the quotient of two functions is a partial function whose domain of definition cannot contain the zeros of the denominator; in this context, a partial function is generally simply called a function. In computability theory, a general recursive function is a partial function from the integers to the integers; no algorithm can exist for deciding whether an arbitrary such function is in fact total. When arrow notation is used for functions, a partial function f from X to Y is sometimes written as f:X⇀Y, f:X↛Y, or f:X↪Y. However, there is no general convention, and the latter notation is more commonly used for inclusion maps or embeddings. Specifically, for a partial function f:X⇀Y, and any x∈X, one has either:

f(x)=y∈Y (it is a single element in Y), or f(x) is undefined. For example, if f is the square root function restricted to the integers

defined by:

then f(n) is only defined if n is a perfect square (that is, 0,1,4,9,16,…). So f(25)=5 but f(26) is undefined.

Basic concepts

A partial function arises from the consideration of maps between two sets X and Y that may not be defined on the entire set X. A common example is the square root operation on the real numbers ℝ: because negative real numbers do not have real square roots, the operation can be viewed as a partial function from ℝ to ℝ. The domain of definition of a partial function is the subset S of X on which the partial function is defined; in this case, the partial function may also be viewed as a function from S to Y. In the example of the square root operation, the set S consists of the nonnegative real numbers [0,+∞). The notion of partial function is particularly convenient when the exact domain of definition is unknown or even unknowable. For a computer-science example of the latter, see Halting problem. In case the domain of definition S is equal to the whole set X, the partial function is said to be total. Thus, total partial functions from X to Y coincide with functions from X to Y. Many properties of functions can be extended in an appropriate sense of partial functions. A partial function is said to be injective, surjective, or bijective when the function given by the restriction of the partial function to its domain of definition is injective, surjective, or bijective, respectively. Because a function is trivially surjective when restricted to its image, the term partial bijection denotes a partial function which is injective. An injective partial function may be inverted to an injective partial function, and a partial function which is both injective and surjective has an injective function as inverse. Furthermore, a function which is injective may be inverted to a bijective partial function. The notion of transformation can be generalized to partial functions as well. A partial transformation is a function f:A⇀B, where both A and B are subsets of some set X.

Function spaces For convenience, denote the set of all partial functions f:X⇀Y from a set X to a set Y by [X⇀Y]. This set is the union of the sets of functions defined on subsets of X with same codomain Y:

[X⇀Y]=⋃D⊆X[D→Y], the latter also written as ⋃D⊆XYD. In finite case, its cardinality is

|[X⇀Y]|=(|Y|+1)|X|, because any partial function can be extended to a function by any fixed value c not contained in Y, so that the codomain is Y∪{c}, an operation which is injective (unique and invertible by restriction).

Discussion and examples The first diagram at the top of the article represents a partial function that is not a function since the element 1 in the left-hand set is not associated with anything in the right-hand set. Whereas, the second diagram represents a function since every element on the left-hand set is associated with exactly one element in the right hand set.

Natural logarithm The natural logarithm function mapping the real numbers to themselves is a partial function, but not a (total) function, since it is undefined for non-positive real inputs. If the domain is restricted to only include the positive reals (that is, if the natural logarithm function is viewed as a function from the positive reals to the reals), then the natural logarithm is a function.

Subtraction of natural numbers Subtraction of natural numbers (in which ℕ is the non-negative integers) is a partial function:

f:ℕ×ℕ⇀ℕ f(x,y)=x−y. It is defined only when x≥y.

Bottom element In denotational semantics a partial function is considered as returning the bottom element when it is undefined. In computer science a partial function corresponds to a subroutine that raises an exception or loops forever. The IEEE floating point standard defines a not-a-number value which is returned when a floating point operation is undefined and exceptions are suppressed, e.g. when the square root of a negative number is requested. In a programming language where function parameters are statically typed, a function may be defined as a partial function because the language's type system cannot express the exact domain of the function, so the programmer instead gives it the smallest domain which is expressible as a type and contains the domain of definition of the function.

… excerpt ends here. Continue reading the full article.

Illustrations

Partial function: An example of a function that is not injective.
An example of a function that is not injective.

Worked examples

Example 1 — a first encounter with Partial function

Start with the simplest possible case. Write down what Partial function claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Partial function before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Partial function ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Partial function

In research
Partial function appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Partial function in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Partial function is common in secondary-school and first-year university syllabi. It links to neighbouring topics Functions and mappings, Mathematical relations, Properties of binary relations, so understanding it makes those chapters shorter.
In everyday life
Look for Partial function outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Partial function” →

How to study Partial function in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Partial function means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Partial function out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Partial function in simple terms?

In mathematics, a partial function f from a set X to a set Y is a function from a subset S of X (possibly the whole X itself) to Y. The subset S, that is, the domain of f viewed as a function, is called the domain of definition or natural domain of f.

Why does Partial function matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Partial function?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Partial function.

Tags

  • Functions and mappings
  • Mathematical relations
  • Properties of binary relations

Keep exploring