Live data from Hacker News

Functions are vectors

thenumb.at

71–80 of 124 posts

Re: Functions are vectors

#71
post #30

I have never seen these index functions used as a transfinite basis for a vector space. And it seems like the function is not a limit point of finite sequences of basis functions, but some weird transfinite sum with mostly zero entries? Clearly there is no Fourier transformation possible on all functions? I think diagonalization methods would be easy to disprove any useful result. Even Hilbert spaces are usually just…

The article is some summary of a book with chapters. At some point they limit the space to the subspace of functions periodic over (b-a) and change the basis (with proof) from dirac delta to sines of frequency 2pi*k/(b-a) [with k in N]. In this subspace all functions have Fourier transformations.

Re: Functions are vectors

#72

What makes the author say that functions are infinite dimensional? Seems like the space of functions might be infinite dimensional but one function is usually not. “AND” is 0001 for 00 01 10 11. 2^4=16 binary Boolean functions, in ternary it blows up, but it’s not infinite.

The author lives in a context of real calculus, as such he declares that the field from the second section onwards will be reals. The functions over the field of booleans can be equally interesting including the Fourier transformation (multiplication in n log n, iirc)! But they are less intuitive and less known.

Re: Functions are vectors

#73
post #25

Earlier quoted context omitted.

We don’t allow multiple values for a given input of a function. Ever. This is never done. f(x) = x^2 is not invertible as a real valued function of a real variable. On the restricted domain of [0, infinity) it is invertible and that inverse is sqrt(x). If you want to talk about negative roots you use the function -1*sqrt(x). You can construct a new function as you did to encapsulate this fact but one never has a func…

Don't be ridiculous. It's a common need, it's easily satisfied, and so it is commonly done. Compare the concept of the "inverse element" of a value given by an invertible function with the "inverse image" of a value given by a non-invertible function. Of course the function that gives you inverse images is nothing more than an inverse function that is allowed to give multiple values. Why do we do that? Because our ne…

In mathematics (and in programming) it is essential to use non-ambiguous names, i.e. names whose meaning is certain when you see them independently of any context, without having to add an explanation of what is meant by them.

The concept of a special kind of mapping between two sets, where to any element of the first set corresponds a unique element of the second set is very important and it needs a special name.

The choice of the names is arbitrary and one could use for instance the term "univocal function" to mean a mapping like described above and "function" for any mapping between two sets.

Nevertheless, by far the most widespread convention in mathematics is to use the term "relation" for any mapping between two sets and the term "function" only for those relations where to any element of the first set corresponds a unique element of the second set.

There exists no reason for not following this convention, from which it also results that an invertible function is a function where for any element of the second set corresponds a unique element of the first set, so this convention also provides a simple meaningful name for another important concept that needs a special name.

The functions in programming languages that return multiple values, unless they return partially or totally random values (in which case they are not functions of only the input arguments, but also of an internal state or of time), are just functions that return values which belong to the set that is the Cartesian product of the types of the individual values. So the name "function" is usually correct in the mathematical sense even for such functions. If they had not been functions, the programmer would not have known what values to return, when writing them.

Moreover, I disagree that in most contexts when you want to invert a function "it isn't actually important that functions yield a single value".

In the overwhelming majority of the cases that appear in engineering and science when you want to solve equations a.k.a. to invert functions, you want to obtain a unique solution that can be directly implemented in practice. Whenever you cannot obtain a unique solution, you need to add extra criteria that allow the selection of a unique solution that is usable. Those extra criteria are actually equivalent with transforming the original non-invertible function into a function that can be inverted.

Re: Functions are vectors

#74

This touches on the actual definition of a function, which is a mapping between sets where every element of the first set maps to exactly one element of the second set. The problem with using vectors is that vectors aren't as general as sets, so there's functions that can't be expressed using vectors. For example, vectors can't be used to handle undefined values or non-numeric elements.

That's not the definition of a function, what you're describing would be called a bijective function. A simple function that is not bijective and maps to two distinct values would be sqrt(x)

Are you defining sqrt(x²) to be +x and -x? If you are, then sqrt(x) is indeed not a function.

You could make it a function by defining sqrt : N -> Z×Z, so sqrt(4) = (-2,2), and we're back to the property that any value in the domain (the natural numbers) is mapped to a single value in the co-domain (a unique pair of integers). Of course, this is not the traditional sqrt function that people normally use, since it doesn't obey the property (sqrt(x))² = x (since obviously taking the square of a pair of integers will not return an integer, for usual definitions of squaring).

Note that a bijective function has both this property and the opposite, that for any value in the co-domain there is also a unique value in the domain that maps to it. Sqrt, both in the traditional definition where it only returns positive roots, and in this definition where it returns a pair of roots, is actually also bijective. Squaring is a non-bijective function, though.

Re: Functions are vectors

#75
post #25

Earlier quoted context omitted.

That is the definition of a function, but it's purely a formalism. In reality, and in theoretical math, we are frequently interested in functions that generate multiple values, and it's very easy to represent those in terms of the formal definition: 1. When we want to consider both positive and negative square roots, we can just say that instead of the function sqrt(x): ℝ ⟶ ℝ which always gives a nonnegative real num…

We don’t allow multiple values for a given input of a function. Ever. This is never done. f(x) = x^2 is not invertible as a real valued function of a real variable. On the restricted domain of [0, infinity) it is invertible and that inverse is sqrt(x). If you want to talk about negative roots you use the function -1*sqrt(x). You can construct a new function as you did to encapsulate this fact but one never has a func…

The point GP was making is that you can also define the function sqrt(x) as a function from reals to pairs of reals, and say that the sqrt(4) is the pair (-2, 2). With a proper definition of squaring a pair of reals, you could even have this be the inverse of the square function (we could define square((x, y)) = x²-xy+y², so square((-2,2))=4-4+4=4).

Of course, these are still functions which take exactlt one element in their input set (the reals for sqrt, or pairs of reals for square) and return for each a single element in their output sets (the pairs of reals for sqrt, or the reals for square).

Re: Functions are vectors

#77
post #36

Earlier quoted context omitted.

Assuming this is in good faith, the units are: - c: speed of light in meters per second - m: mass in kilograms - energy: joules

yes it was in total good faith. soooo... the metric system just happens to perfectly conform to meters per second squared times kilograms equaling joules? That seems... mind-blowing since it was invented before kilograms and joules would have been interchangeable.. ??.

The kinetic energy of a body, in purely Newtonian mechanics, is Ec = (m × v²) / 2. Since energy is measured in J, mass in kg, and speed in m/s, it follows nicely that J = kg × m² / s². Or, we can also take the potential energy of a body at some height h above the Earth: Ep = m × h × g, where g is the gravitational acceleration, ~9.8m/s², and we get the same units.

It's really not in any way surprising - this is basically the definition of the Joule. The link between units of kinetic energy and units of thermal energy is actually more surprising.

The surprising thing about E=mc² is that it gives a definition of energy for a completely stationary body outside any external field.

One way to look at it is actually that this is simply the kinetic energy of the body, and that all "stationary" bodies are in fact moving with speed c on the t coordinate in 4D space-time ("a body which is not moving in space at all is moving with speed c towards the future"). [Note that of course speeds are all relative to some reference frame.]

Re: Functions are vectors

#78
I haven't read the article yet, but I've known that functions are (infinite) vectors for some years.

However, there's something that has been bothering me: most of my understanding of linear algebra comes from 2D and 3D spaces, and then in different context of machine learning, datasets that have from tens to even millions of dimensions.

In the former, geometric context, the connection between the dimensions are clear: they are orthogonal, but conceptually exactly similar. They are just a 90 degree rotation away from each other.

On the other hand, in ML datasets some dimensions are conceptually very similar, and some are totally different. Some are correlated (nearby pixels of an image), some are not, but represent the same unit of quality, and some represent totally different, unrelated things. And as we go toward the mid-layer representations, it becomes very unclear and fuzzy what they represent.

In the case of functions, there's usually a clear connection between the dimensions: they are of the same unit (the domain and the image (the outputs and inputs) of the function are sets, and those tend to be made of similar-ish – or same type of – things, at least in well-behaved math). And there's often a similarity metric between the elements of the sets.

The 2D/3D linear algebra that I know doesn't bother with the "connectedness" of the input dimensions; it only cares the connections from the inputs to the outputs. But surely there is a lot of interesting math that is concerned with the connectedness of the input and output spaces themselves, in context of there still existing a mapping between the input and output. What is that field of math called? What are the interesting results, theorems and such? I love learning more so I'm kind of just looking for some pointers/keywords.

Re: Functions are vectors

#79
post #15

The realization that functions can be treated as elements in an abstract vector space (with infinitely many dimensions) is a turning point in the history of mathematics that led to the emergence of the sub-field known as functional analysis . The significance of this paradigm shift is that it allowed mathematicians to apply some of the geometric intuition developed from the study of finite-dimensional spaces (such as…

My friend, you don't even need it to be in vector space for functional analysis. Truly what is needed is just an inner product. I will grant you the inner product must be linear and hence in a vector space.

I dont understand the point of this comment. You obviously need it to be a vector space before you can define an inner product. Inner product spaces are very special examples of vector spaces.

Re: Functions are vectors

#80

"Given these definitions, we can now prove all necessary vector space axioms." And that is just the first howler. This person never bothered to learn the subject they are expounding on.

The article is by no means perfect, but that "howler" sees completely fine to me. If you want to prove something is a vector space the standard way would be to prove that all the vector space axioms hold for it.
Post reply on HN