What is a Function?

Basic Definition

A function is a mathematical operation that describes how a variable is altered, based on the inner workings of the function. Functions themselves can be thought of as processes, and by inputting a value to the process, we get the result of what the process does to the value.

Above, the input is passed into the function . The result of inputting into the function is the output .

Visualisation

When visualising the function we see a line. This line tells us that for every time we input 1, we get 1 as an output. As we go along the number line on the horizontal axis, we go along the number line at the same rate on the horizontal axis.

Function Intuitions

Functions can take many forms, since there are many real-world processes that are described by functions. It is therefore important to develop an intuition around some of the basic functions.

Linear Functions

Simple Addition

Linear functions, such as then show that for one input to the function () we get three times that input, as the output.

Equation of a Line

The equation of any line can be generalised to . Where for any input we output and add .

  • corresponds to the gradient of the line.
  • corresponds to the y intercept of the line.

Non-linear Functions

Exponentials

Exponentials describe how many times a variable is being multiplied by itself. In other words, how many times are we feeding back a variable, for any given input of that variable.

Formal Definition of a Function

A function, formally, maps elements of one set to elements of another set.

In most of the cases covered in the above section, we are dealing with functions that map from real numbers to another set in the real numbers, in other words . However, many other types of functions exist.

Why do we need Functions?

Functions unlock a way of analysing the world that would have been previously hard to analyse concretely. If two things are related in some way, a function is needed. Whether it be how the speed of an object changes with time, how the number of trees relates to the amount of wildlife in a given area, or how spacecraft hurl around planets in the solar systems. Functions help us understand relationships.


Functionals

Definitions of a Functional

Functionals are a generalisation of the behaviour of functions. There are different ways to define functionals, based on the domain in which they are applied.

1. The Linear Algebra Definition of a Functional

2. The Functional Analysis Definition of a Functional

In functional analysis, functionals differ in subtle ways to functions, taking functions as inputs to functionals, and outputting a scalar value - a number.

Why do we need Functionals?

In order to handle things like Optimal Control, Lagrangian Mechanics and Geodesics.

Examples of Functionals

  • The dot product can be considered a functional
  • norms can be considered functionals.

Functions vs Functionals

FunctionsFunctionals
Takes a number as inputTakes a function as input
Returns a numberReturns a number
No general formGenerally expressed as a definite integral
Changes described as ordinary derivativesChanges described as functional derivatives