Home

Funcion

Función, or función in Spanish, is a fundamental concept in mathematics and computer science describing a rule that assigns to each input exactly one output. In general usage, the term denotes a mapping from a domain to a codomain, where the input set is often called the domain and the output set the codomain. The standard notation expresses this as f: X → Y with f(x) = y, and the graph of the function consists of all ordered pairs (x, f(x)).

In mathematics, a function must assign a single output to every input in its domain. The image

In programming, a function is a reusable block of code that takes inputs, performs operations, and returns

Etymology traces the term to the Latin functio, meaning performance or execution. In Spanish, the word is

---

(or
range)
is
the
set
of
outputs
that
actually
occur,
while
the
domain
is
the
set
of
inputs
for
which
the
rule
is
defined.
Functions
can
be
classified
by
properties
such
as
injectivity
(one-to-one),
surjectivity
(onto),
and
bijectivity
(both).
Examples
include
linear
functions
like
f(x)
=
mx
+
b
and
the
squaring
function
f(x)
=
x^2.
The
inverse
of
a
function
exists
when
the
function
is
bijective,
providing
a
rule
that
reverses
the
assignment.
a
value.
Functions
promote
modularity
and
can
be
pure
(no
side
effects)
or
impure
(may
affect
external
state).
They
are
central
to
software
design,
with
syntax
and
conventions
varying
across
languages.
escrita
as
función
with
an
acute
accent;
in
English
and
many
programming
contexts,
function
is
used
without
diacritics.