Fixed point (mathematics)

 This article is not about fixedpoint arithmetic.
In mathematics, a fixed point of a function is a point that is mapped to itself by the function. For example, if f is defined on the real numbers by
 f(x) = x^{2} − 3x + 4,
then 2 is a fixed point of f, because f(2) = 2.
Not all functions have fixed points: for example, the function f(x) = x + 1 has no fixed point on the reals, since x is never equal to x + 1 for any real number. In graphical terms, a fixed point means the point (x, f(x)) is on the line y = x, or in other words the graph of f has a point in common with that line. The example is a case where the graph and the line are a pair of parallel lines.
Contents 
Attractive fixed points
An attractive fixed point of a function f is a fixed point x_{0} of f such that for any value of x in the domain that is close enough to x_{0}, the iterated function sequence
 <math>x,\ f(x),\ f(f(x)),\ f(f(f(x))), \dots<math>
converges to x_{0}. How close is "close enough" is sometimes a subtle question.
The natural cosine function ("natural" means in radians, not degrees or other units) has exactly one fixed point, which is attractive. In this case "close enough" is not a stringent criterion at all  to demonstrate this, start with any real number and repeatedly press the cos key on a calculator. It quickly converges to about 0.73908513 (provided, of course, it is set to find cosines in radians), the fixed point. That is where the graph of the cosine function intersects the line y = x, and this is no coincidence.
Not all fixed points are attractive: for example, x = 0 is a fixed point of the function f(x) = x^{2} + x, but iteration of this function for any value other than zero rapidly diverges.
Attractive fixed points are a special case of a wider mathematical concept of attractors.
Theorems guaranteeing fixed points
There are numerous theorems in different parts of mathematics that guarantee that functions, under certain circumstances, must have one or more fixed points. These are amongst the most basic qualitative results available: such fixedpoint theorems that apply in generality are very valuable insights.
Applications
In many fields, equilibrium or stability are fundamental concepts that can be described in terms of fixed points. For example, in economics, a Nash equilibrium of a game is a fixed point of the game's best response correspondence.
In compilers, fixed point computations are used for whole program analysis, which is often required to do code optimization. The vector of PageRanks of all web pages is the fixed point of a linear transformation derived from the World Wide Web's link structure.
Logician Saul Kripke makes use of fixed points in his influential theory of truth. He shows how one can generate a partially defined truth predicate (one which remains undefined for problematic sentences like "This sentence is not true"), by recursively defining "truth" starting from the segment of a language which contains no occurrences of the word, and continuing until the process ceases to yield any newly welldefined sentences. (This will take a denumerable infinity of steps.) That is, for a language L, let Lprime be the language generated by adding to L, for each sentences S in L, the sentence "S is true." A fixed point is reached when Lprime is L; at this point sentences like "This sentence is not true" remain undefined, so, according to Kripke, the theory is suitable for a natural language which contains its own truth predicate.