Difference between revisions of "Function"
m |
m |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
A function {{M|f}} is a special kind of [[Relation|relation]] | A function {{M|f}} is a special kind of [[Relation|relation]] | ||
− | + | __TOC__ | |
− | == | + | ==Definition== |
− | A function | + | A function is a special kind [[relation]]<ref name="API">Analysis - Part 1: Elements - Krzysztof Maurin</ref>, for a relation: |
− | = | + | * {{M|f\subseteq X\times Y}} |
− | + | We must have: | |
− | * | + | * {{M|f}} being a ''right-unique'' relation, recall that is: |
− | * | + | ** For a relation {{M|\mathcal{R}\subseteq X\times Y}} we have {{M|1=\forall x\in X\forall y,z\in Y[(x\mathcal{R}y\wedge x\mathcal{R}z)\implies y=z]}} |
− | + | * Everything maps to something | |
− | + | Then we write: {{M|f:X\rightarrow Y}}<ref name="API"/> | |
− | + | Furthermore, if {{M|(x,y)\in f}} (which is to say {{M|xfy}} or {{M|f}} relates {{M|x}} to {{M|y}}) we write: | |
+ | * {{M|1=f(x)=y}} or {{M|f:x\mapsto y}} | ||
+ | ==Notation when [[Tuple|tuples]] are involved== | ||
+ | It is often convenient to write things like {{M|f:(A,B)\rightarrow(C,D,E)}} where {{M|(A,B)}} is a space with some useful property, this always means {{M|f:A\rightarrow C}}, for example: | ||
* If we have say two [[Topological space|topological spaces]] {{M|(X,\mathcal{J})}} and {{M|(Y,\mathcal{K})}} then we may write: | * If we have say two [[Topological space|topological spaces]] {{M|(X,\mathcal{J})}} and {{M|(Y,\mathcal{K})}} then we may write: | ||
** {{M|f:(X,\mathcal{J})\rightarrow(Y,\mathcal{K})}} and mean {{M|f:X\rightarrow Y}} | ** {{M|f:(X,\mathcal{J})\rightarrow(Y,\mathcal{K})}} and mean {{M|f:X\rightarrow Y}} | ||
* '''That is to say that as a general rule given a function {{M|f:(A_1,A_2,\cdots)\rightarrow(B_1,B_2,\cdots)}} take it as a function {{M|f:A_1\rightarrow B_1}}''' | * '''That is to say that as a general rule given a function {{M|f:(A_1,A_2,\cdots)\rightarrow(B_1,B_2,\cdots)}} take it as a function {{M|f:A_1\rightarrow B_1}}''' | ||
− | ** A [[Tuple|tuple]] makes no sense there anyway, for multiple arguments we | + | ** A [[Tuple|tuple]] makes no sense there anyway, for multiple arguments we write the [[Cartesian product]], so {{M|f:A\times B\rightarrow C\times D\times E}} say means "{{M|f}} takes an argument in {{M|A}} and another argument in {{M|B}} and maps these to a [[tuple]] whose first element is in {{M|C}}, second in {{M|D}} and third in {{M|E}}". |
− | + | ===Notation for restriction=== | |
− | {{ | + | {{Yellow Note|I have seen this notation used nowhere else, only in ''Fundamentals of Algebraic Topology'' by ''Steven H. Weintraub'', I include it only so the reader can be aware of it should they encounter it. Use it as a last resort}} |
+ | Suppose we have {{M|f:(X,A)\rightarrow(Y,B)}} where {{M|A\subseteq X}} and {{M|B\subseteq Y}} and are not a part of the definition for a space on {{M|X}} or {{M|Y}}, then: | ||
+ | * {{M|f:(X,A)\rightarrow(Y,B)}} may mean<ref name="FOAT">Fundamentals of Algebraic Topology - Steven H. Weintraub</ref> the following: | ||
+ | ** {{M|f:X\rightarrow Y}} (as expected) with the additional information that: | ||
+ | ** {{M|f\vert_A:A\rightarrow B}} (where {{M|f\vert_A}} denotes the [[restriction]] of {{M|f}} to {{M|A}}) | ||
+ | ** Which is to say that {{M|f(A)\subseteq B}} | ||
+ | ==Conventions== | ||
+ | We've now covered the formal definition of a function, however conventionally sometimes these are broken | ||
+ | ===Functions and their domain=== | ||
+ | A function '''ought''' be defined for everything in its domain, that's for every point in the domain the function maps the point to something. Often mathematicians don't bother (as [[Mathematicians are lazy]]) especially if the number of undefined points is finite. | ||
+ | ====Examples==== | ||
+ | * <math>f:\mathbb{R}\rightarrow\mathbb{R}</math> given by <math>f(x)=\frac{1}{x}</math> isn't defined at <math>0</math>, it should be: {{M|f:\mathbb{R}-\{0\}\rightarrow\mathbb{R} }} with {{M|f:x\rightarrow\frac{1}{x} }} | ||
+ | * <math>f:\mathbb{R}\rightarrow\mathbb{R}</math> given by <math>f(x)=x^2</math> is correct, it is not [[Surjection|surjective]] though, because nothing maps onto the negative numbers, however <math>f:\mathbb{R}\rightarrow\mathbb{R}_{\ge 0}</math> with <math>f(x)=x^2</math> is a surjection. It is not an [[Injection|injective function]] as only <math>0</math> maps to one point. | ||
+ | ==Alternative names== | ||
+ | A function may {{AKA}}: | ||
+ | * mapping<ref name="API"/> | ||
+ | * map<ref name="API"/> | ||
+ | * correspondence | ||
+ | ==See also== | ||
+ | * [[Surjection]] | ||
+ | * [[Bijection]] | ||
+ | * [[Injection]] | ||
==References== | ==References== | ||
<references/> | <references/> | ||
{{Definition|Set Theory}} | {{Definition|Set Theory}} | ||
+ | [[Category:Exemplary pages]] | ||
+ | [[Category:First-year friendly]] |
Latest revision as of 13:01, 19 February 2016
A function [ilmath]f[/ilmath] is a special kind of relation
Contents
Definition
A function is a special kind relation[1], for a relation:
- [ilmath]f\subseteq X\times Y[/ilmath]
We must have:
- [ilmath]f[/ilmath] being a right-unique relation, recall that is:
- For a relation [ilmath]\mathcal{R}\subseteq X\times Y[/ilmath] we have [ilmath]\forall x\in X\forall y,z\in Y[(x\mathcal{R}y\wedge x\mathcal{R}z)\implies y=z][/ilmath]
- Everything maps to something
Then we write: [ilmath]f:X\rightarrow Y[/ilmath][1] Furthermore, if [ilmath](x,y)\in f[/ilmath] (which is to say [ilmath]xfy[/ilmath] or [ilmath]f[/ilmath] relates [ilmath]x[/ilmath] to [ilmath]y[/ilmath]) we write:
- [ilmath]f(x)=y[/ilmath] or [ilmath]f:x\mapsto y[/ilmath]
Notation when tuples are involved
It is often convenient to write things like [ilmath]f:(A,B)\rightarrow(C,D,E)[/ilmath] where [ilmath](A,B)[/ilmath] is a space with some useful property, this always means [ilmath]f:A\rightarrow C[/ilmath], for example:
- If we have say two topological spaces [ilmath](X,\mathcal{J})[/ilmath] and [ilmath](Y,\mathcal{K})[/ilmath] then we may write:
- [ilmath]f:(X,\mathcal{J})\rightarrow(Y,\mathcal{K})[/ilmath] and mean [ilmath]f:X\rightarrow Y[/ilmath]
- That is to say that as a general rule given a function [ilmath]f:(A_1,A_2,\cdots)\rightarrow(B_1,B_2,\cdots)[/ilmath] take it as a function [ilmath]f:A_1\rightarrow B_1[/ilmath]
- A tuple makes no sense there anyway, for multiple arguments we write the Cartesian product, so [ilmath]f:A\times B\rightarrow C\times D\times E[/ilmath] say means "[ilmath]f[/ilmath] takes an argument in [ilmath]A[/ilmath] and another argument in [ilmath]B[/ilmath] and maps these to a tuple whose first element is in [ilmath]C[/ilmath], second in [ilmath]D[/ilmath] and third in [ilmath]E[/ilmath]".
Notation for restriction
Suppose we have [ilmath]f:(X,A)\rightarrow(Y,B)[/ilmath] where [ilmath]A\subseteq X[/ilmath] and [ilmath]B\subseteq Y[/ilmath] and are not a part of the definition for a space on [ilmath]X[/ilmath] or [ilmath]Y[/ilmath], then:
- [ilmath]f:(X,A)\rightarrow(Y,B)[/ilmath] may mean[2] the following:
- [ilmath]f:X\rightarrow Y[/ilmath] (as expected) with the additional information that:
- [ilmath]f\vert_A:A\rightarrow B[/ilmath] (where [ilmath]f\vert_A[/ilmath] denotes the restriction of [ilmath]f[/ilmath] to [ilmath]A[/ilmath])
- Which is to say that [ilmath]f(A)\subseteq B[/ilmath]
Conventions
We've now covered the formal definition of a function, however conventionally sometimes these are broken
Functions and their domain
A function ought be defined for everything in its domain, that's for every point in the domain the function maps the point to something. Often mathematicians don't bother (as Mathematicians are lazy) especially if the number of undefined points is finite.
Examples
- [math]f:\mathbb{R}\rightarrow\mathbb{R}[/math] given by [math]f(x)=\frac{1}{x}[/math] isn't defined at [math]0[/math], it should be: [ilmath]f:\mathbb{R}-\{0\}\rightarrow\mathbb{R} [/ilmath] with [ilmath]f:x\rightarrow\frac{1}{x} [/ilmath]
- [math]f:\mathbb{R}\rightarrow\mathbb{R}[/math] given by [math]f(x)=x^2[/math] is correct, it is not surjective though, because nothing maps onto the negative numbers, however [math]f:\mathbb{R}\rightarrow\mathbb{R}_{\ge 0}[/math] with [math]f(x)=x^2[/math] is a surjection. It is not an injective function as only [math]0[/math] maps to one point.
Alternative names
A function may AKA: