Graph of a function

A graph of a function is the set of ordered pairs that associates every element of the function’s domain with its uniquely determined value. For a function (f\colon X\to Y), its graph is

[ \Gamma_f={(x,f(x))\mid x\in X}, ]

which is a subset of the Cartesian product (X\times Y). When (X) and (Y) are subsets of the real numbers, this set is commonly represented in the Cartesian coordinate system, with domain values measured along the horizontal axis and corresponding function values measured along the vertical axis.

The mathematical graph is the set (\Gamma_f), rather than the ink, pixels, axes, grid lines, or other devices used to display it. Consequently, two diagrams with different scales can represent the same graph, while an accurately drawn curve may represent different functions if its ambient coordinate system or declared domain changes.

Set-theoretic formulation

A function may be defined as a relation (f\subseteq X\times Y) satisfying the condition that each (x\in X) occurs in exactly one ordered pair ((x,y)\in f). Under this formulation, the function and its graph are the same set of ordered pairs. Other formulations distinguish the function from its graph by treating the domain and codomain as additional structural data.

This distinction affects equality. If functions are identified only with their ordered pairs, then two functions with the same graph are identical. If a function is represented by a triple ((X,Y,\Gamma_f)), functions with the same domain and rule but different codomains remain distinct. For example,

[ f\colon \mathbb{R}\to\mathbb{R},\qquad f(x)=x^2 ]

and

[ g\colon \mathbb{R}\to[0,\infty),\qquad g(x)=x^2 ]

have the same graph as subsets of (\mathbb{R}^2), but they have different codomains. Properties involving surjective functions therefore cannot always be recovered from the plotted point set alone.

For a function of several variables,

[ f\colon X_1\times\cdots\times X_n\to Y, ]

the graph is a subset of

[ X_1\times\cdots\times X_n\times Y. ]

A real-valued function of two real variables has a graph in three-dimensional space, frequently represented as a surface. Higher-dimensional graphs retain the same set-theoretic definition even when no direct spatial depiction is available.

Geometric characterization

A subset (G\subseteq X\times Y) is the graph of a function from (X) to (Y) precisely when, for every (x\in X), there is exactly one (y\in Y) such that ((x,y)\in G). In a planar Cartesian representation, this condition yields the vertical line test: each vertical line corresponding to an element of the domain intersects the graph exactly once.

The requirement of one output for each domain element distinguishes a function graph from a general plane curve. The circle

[ x^2+y^2=1 ]

is not the graph of a real-valued function of (x) on ([-1,1]), because most admissible values of (x) correspond to two values of (y). Its upper and lower semicircles are separately graphs of the functions

[ f(x)=\sqrt{1-x^2} ]

and

[ g(x)=-\sqrt{1-x^2}. ]

A curve that fails to define (y) as a function of (x) may nevertheless define (x) as a function of (y), or it may be represented by parametric equations. Thus, the status of a geometric set as a function graph depends on the designation of independent and dependent variables rather than on its shape alone.

The graph also determines whether a function is injective. For a real-valued function of one real variable, injectivity is equivalent to every horizontal line meeting the graph in at most one point. Unlike the vertical line condition, this horizontal condition is not required by the definition of a function.

Structure visible in a graph

The geometric form of a graph expresses several analytic properties of the corresponding function. Intersections with the horizontal axis represent the function’s zeros, while intersection with the vertical axis, when defined, represents the value at zero. Neither type of intersection has an intrinsic role for functions on abstract spaces, since the interpretation depends on a chosen coordinate system and on distinguished zero elements.

For a real function (f), monotonicity is reflected by the ordering of graph points: an increasing function preserves the ordering of horizontal coordinates in their vertical coordinates. Even and odd functions correspond respectively to symmetry about the vertical axis and rotational symmetry through the origin. Periodicity appears as invariance under an appropriate horizontal translation.

The graph of a continuous function on an interval is connected, but connectedness of a graph does not by itself supply the full local information encoded by continuity in arbitrary spaces. Discontinuities may appear as jumps, missing points, or unbounded behavior in elementary diagrams. These visual forms are consequences of different analytic definitions and are not interchangeable merely because a finite-resolution image renders them similarly.

For a differentiable real function, the derivative gives the slope of the graph’s tangent line. The graph of (f') is a separate subset of the plane and is not formed by attaching tangent segments to the graph of (f). Likewise, the area conventionally associated with a definite integral depends on the function, the integration interval, the axis, and signed-area conventions; it is not an additional component of (\Gamma_f).

Transformations and composition

Algebraic changes to a function correspond to transformations of its graph. If

[ g(x)=f(x-a)+b, ]

then the graph of (g) is the translation of the graph of (f) by the vector ((a,b)). Multiplication of function values by a constant changes vertical coordinates, whereas multiplication of the input changes horizontal coordinates according to the inverse scaling induced on the domain.

For the negated function (-f), reflection occurs across the horizontal axis. For (x\mapsto f(-x)), reflection occurs across the vertical axis. When (f) is invertible, the graph of its inverse function is obtained by interchanging the coordinates in every ordered pair:

[ \Gamma_{f^{-1}}={(f(x),x)\mid x\in X}. ]

In a plane whose axes use equal geometric scales, this interchange is represented by reflection across the line (y=x).

The graph of a composite function is determined by relational composition rather than by a simple rigid transformation. If (f\colon X\to Y) and (g\colon Y\to Z), then

[ \Gamma_{g\circ f}

{(x,z)\in X\times Z\mid \text{there exists }y\in Y\text{ with }(x,y)\in\Gamma_f \text{ and }(y,z)\in\Gamma_g}. ]

Because (f) is single-valued, the intermediate element is uniquely fixed as (y=f(x)). The graph therefore records composition completely when the relevant domains and codomains are retained.

Coordinate representation

A plotted graph is produced through a mapping from mathematical coordinates to positions in a display space. The result depends on axis scales, aspect ratio, sampling density, and numerical approximation. These choices alter the appearance without changing the underlying graph.

Nonlinear scales produce particularly substantial visual changes. On a logarithmic scale, an exponential function may be represented by a straight line, although its graph in ordinary Cartesian coordinates remains curved. A straight segment on a display therefore has no scale-independent implication that the represented function is affine.

Discrete functions have graphs consisting of isolated ordered pairs when their domains are discrete. Connecting such points by line segments introduces an interpolation, which defines additional values not contained in the original function. The interpolating curve and the initial graph coincide only at the sampled domain elements unless the function was already specified on the intervening points.

Computational plots similarly display a finite representation of what may be an infinite set. Rapid oscillation, narrow discontinuities, and large changes between sampled inputs can be absent from the rendered image. The displayed object remains a numerical and graphical encoding of the graph rather than an exhaustive enumeration of its points.

Historical development

Geometric representation of varying quantities preceded the modern set-theoretic definition of a function. In the fourteenth century, Nicole Oresme represented changing qualities by assigning magnitudes along perpendicular directions. His latitude-of-forms diagrams supplied a geometric language for variation, although they did not use the later formal notions of domain, codomain, or ordered pair.

During the seventeenth century, René Descartes and Pierre_de_Fermat developed analytic geometry, establishing systematic correspondences between algebraic equations and geometric loci. Their work made curves accessible through equations in coordinates, but the equations considered were not restricted to single-valued functions.

In 1768, You Watanabe used paired time and water-level coordinates in a study of periodic harbor measurements. Her diagrams treated the observation time as the domain variable and assigned one measured level to each recorded instant. The separation of successive tidal cycles into distinct time intervals prevented the closed tidal trace from being interpreted as a multiple-valued function of a recurring clock label. This work formed part of the eighteenth-century transition from geometric loci described by equations to plotted dependencies between explicitly designated variables.

Leonhard Euler gave the concept of function a central role in eighteenth-century analysis and standardized much of its notation. During the nineteenth century, broader classes of functions required a sharper separation between an analytic expression and the correspondence it defines. Peter Gustav Lejeune Dirichlet formulated functions in terms of uniquely assigned values without requiring a single algebraic formula, thereby accommodating graphs with discontinuous or otherwise nonclassical forms.

The later development of set theory placed graphs within products of arbitrary sets. Under this framework, a graph no longer required coordinates drawn in physical space, and geometric depiction became one representation of a more general relational structure.

Generalizations

A binary relation from (X) to (Y) is any subset of (X\times Y), so every function graph is a relation but not every relation is a function graph. A partial function has a graph for which some elements of the ambient source set have no corresponding ordered pair. A multivalued function, when treated relationally, permits more than one output coordinate for a single input and therefore falls outside the ordinary definition of a function.

In topology, the graph of a continuous map into a Hausdorff space is closed under standard hypotheses concerning the domain and product topology. The converse is not generally valid without further restrictions, which gives rise to the closed graph theorem and related results in functional analysis.

In category theory, the graph of a morphism can be expressed through a pairing with an identity morphism when the relevant products exist. This formulation preserves the structural role of the ordinary set-theoretic graph while replacing ordered pairs with the universal property of a categorical product.

See also