Difference between revisions of "Examples in mathematics"
(→Unit testing and examples) |
(→Unit testing and examples) |
||
Line 15: | Line 15: | ||
! Is an example according to intuition | ! Is an example according to intuition | ||
| An "obvious" example, or central example. Let <math>f : \mathbf R \to \mathbf R</math> be defined by <math>f(x) = 2x^2 - 3x + 5</math>. This does define a function, and someone who thought that a function is "something that is defined by a formula" would think that this is a function. | | An "obvious" example, or central example. Let <math>f : \mathbf R \to \mathbf R</math> be defined by <math>f(x) = 2x^2 - 3x + 5</math>. This does define a function, and someone who thought that a function is "something that is defined by a formula" would think that this is a function. | ||
− | | A surprising non-example. <math>f(a/b) = a</math> (i.e. a function that outputs the numerator of a fraction) | + | | A surprising non-example. Let <math>f : \mathbf Q \to \mathbf Z</math> be defined by <math>f(a/b) = a</math> (i.e. a function that outputs the numerator of a fraction). This does ''not'' define a function. To see this, note that <math>f(1/2) = 1</math> and <math>f(3/6) = 3</math>. But <math>1/2=3/6</math> so we must have <math>f(1/2)=f(3/6)</math> (a function must output a unique object for any given object), but <math>1\ne3</math>, so something has gone wrong. It turns out that each fraction has many different representations, and the idea of taking "the" numerator does not make sense, unless we constrain the representation somehow (e.g. by reducing the fraction and always putting any minus sign in the numerator).<br> a function <math>f : A \to \emptyset</math> where <math>A \ne \emptyset</math>. |
|- | |- | ||
! Is not an example according to intuition | ! Is not an example according to intuition |
Revision as of 02:44, 19 February 2019
Examples in mathematics have different flavor than examples in other disciplines. This is probably because definitions in mathematics are different from definitions in other disciplines (mathematical definitions are exact). Some common problems of deciding whether something is or is not an example do not appear in mathematics. Instead, there are other problems.
Unit testing and examples
A common problem in math is that one comes in with some preconceived idea of what an object should "look like" which is different from what the definition says. In other words, there is a mismatch between one's intuitive notion and the definition.
Take the example of a definition of function. A function is some object that takes each object in some set to a unique object in another set. Someone who was not familiar with the formal definition might mistakenly think of a function as "something that is defined by a formula".
Is an example according to definition | Is not an example according to definition | |
---|---|---|
Is an example according to intuition | An "obvious" example, or central example. Let ![]() ![]() |
A surprising non-example. Let ![]() ![]() ![]() ![]() ![]() ![]() ![]() a function ![]() ![]() |
Is not an example according to intuition | A surprising example. Let ![]() ![]() Another example is the empty function ![]() ![]() As a third example, let ![]() ![]() ![]() |
An obvious non-example. |
Hierarchical nature of examples
Something can be considered "concrete" or "abstract" depending on the context. Consider a term like "metric space". One can give examples of metric spaces. On the other hand, a metric space is itself an example (of a structured space, of a topological space).