Live data from Hacker News

Functions are vectors

thenumb.at

111–120 of 124 posts

Re: Functions are vectors

#111

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 clea…

I think what you're getting at is two things. You have a dataset. This consists of some set of observations, each of which contains features that have been observed. These may be things like education level, age, income, favorite color, gender, and height. Three of these variables are continuous. One is ordinal. One is nominal. One is binary. Can you do any kind of meaningful matrix operations with this data? Traditi…

> I think your question is how can we encode data such that it all ends up in the same vector space?

No, it's not. Yes, that is an example of a single question we could ask when doing work in that context. My question was:

> 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

#112

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 clea…

> 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. Topology. Topology studies neighborhoods in your space and how they relate to things like functions, limits, etc. Since you brought up images: https://en.wikipedia.org/wiki/Digital_topology And data science: https…

Yeah, topology seems to have a lot to do with it! However, I hesitated to jump into that conclusion, because my impression of topology is that it's concerned of "whether" something is connected (and often about the directedness of surfaces/spaces), because topology allows "stretchiness" of its study matter. The connections between things are then kind of binary things - either something is connected or not. However, in the world of "connected dimensions", there seems to be degrees of connectedness. Linear correlation being from the simplest end, but more generally, shared entropy. So it feels like just "topology" doesn't quite catch the field and its pecularities.

Thanks for the links!! Much appreciated.

Re: Functions are vectors

#113

Earlier quoted context omitted.

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 doe…

That's a very good point

Re: Functions are vectors

#114
post #65

> Now, a vector really is just an arbitrary function Not really grokking this. Seems to come out of nowhere.

In mathematics, a function is a mapping from input values to output values. A vector is a mapping from a set of integers to a value at the specified index, therefore it is a function. e.g. float vector[4]{1.0, 5.0, 3.0, 2.5}; vector[0] == 1.0; vector[1] == 5.0; vector[2] == 3.0; vector[3] == 2.5;

Thanks, I think I was thrown by the word "arbitrary".

"A vector is a function" makes much more sense to me.

Re: Functions are vectors

#115

Earlier quoted context omitted.

A set-valued function is a perfectly valid kind of function, and a multivalued function in complex analysis is just a set-valued function with certain continuity and other restrictions.

If set up that way then yes it meets the definition of a function. I’m not a complex analyst but I imagine they think of a function from C to C on a given branch rather than multi-function being a function from C to the countable product of C (or however one wants to formally define the set value). I think this because they tend to care about analytic properties and saying function from C to countable product of C in…

From the amount of complex analysis I've seen, I think I agree with you.

The insight behind multi-valued functions seems to be that for certain types of functions that seem unambiguous in the real case (roots, logarithms, ...) there's no clear candidate for which one is "the" logarithm function etc. So theorems look more like "let l be a logarithm function".

If you actually want to do complex analysis, it would not be very useful to have a vector valued function (even if that's technically possible) for logarithm etc. because most of the theory is developed for (in particular, differentiable) functions C -> C. So you'd rather just pick a branch.

Re: Functions are vectors

#116
post #9

Earlier quoted context omitted.

Caching and evaluation doesn’t make any kind of sense for mathematical functions. They’re just mappings.

Yeah, but it’s true in a sense because an element of a finite-dimensional vector space can be thought of as a function from a finite set into a field.

Only if the space has a canonical basis.

Re: Functions are vectors

#117
post #65

Earlier quoted context omitted.

In mathematics, a function is a mapping from input values to output values. A vector is a mapping from a set of integers to a value at the specified index, therefore it is a function. e.g. float vector[4]{1.0, 5.0, 3.0, 2.5}; vector[0] == 1.0; vector[1] == 5.0; vector[2] == 3.0; vector[3] == 2.5;

Thanks, I think I was thrown by the word "arbitrary". "A vector is a function" makes much more sense to me.

Yep. "Arbitrary" as in it can represent any function you want on the natural numbers (0 to infinity).

Re: Functions are vectors

#118

Earlier quoted context omitted.

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 doe…

The codomain should not be Z×Z — firstly, the square root is usually not an integer, but more importantly, there is not a canonical ordering of the pairs you get, especially if we allow negative/complex inputs. The map we really want is

sqrt: C -> (C×C)/~,

where C is the complex numbers and ~ is the equivalence relation generated by (a,b) ~ (b,a) for all a,b in C.

Re: Functions are vectors

#119

Earlier quoted context omitted.

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 doe…

The codomain should not be Z×Z — firstly, the square root is usually not an integer, but more importantly, there is not a canonical ordering of the pairs you get, especially if we allow negative/complex inputs. The map we really want is sqrt: C -> (C×C)/~, where C is the complex numbers and ~ is the equivalence relation generated by (a,b) ~ (b,a) for all a,b in C.

You're right, I should have said sqrt : N -> R×R. I don't think the order is a problem, we can define the function such that sqrt(x)={a | a²=x}. Sets are inherently unordered, {-2,2} = {2,-2}.

Of course, this is not a surjective function, but it is a function nevertheless.

Re: Functions are vectors

#120

Earlier quoted context omitted.

The codomain should not be Z×Z — firstly, the square root is usually not an integer, but more importantly, there is not a canonical ordering of the pairs you get, especially if we allow negative/complex inputs. The map we really want is sqrt: C -> (C×C)/~, where C is the complex numbers and ~ is the equivalence relation generated by (a,b) ~ (b,a) for all a,b in C.

You're right, I should have said sqrt : N -> R×R. I don't think the order is a problem, we can define the function such that sqrt(x)={a | a²=x}. Sets are inherently unordered, {-2,2} = {2,-2}. Of course, this is not a surjective function, but it is a function nevertheless.

The issue with sets is that they don’t capture the notion of multiplicity. One would like to say sqrt(0) = {0,0}, but {0,0} is just equal to {0} as a set. The CxC/~ formalism captures the possibility of multiplicity as well as the fact that the output always has size 2.

As an aside, the notation R x R means ordered pairs of reals. So for your definition, you would instead want 2^R as the codomain (i.e. the set of subsets of R).

Post reply on HN