# Vector space of functions from finite set to real numbers

Summary:: Problem interpreting a vector space of functions f such that f: S={1} -> R

Hello,

Another question related to Jim Hefferon' Linear Algebra free book. Before explaining what I don't understand, here is the problem :

I have trouble understanding how the dimension of resulting space for part (a) has to be 1 and not infinity. Generally speaking, I can't wrap my head around how this can represent a vector space.

If I understand correctly, this definition means that the only tolerated argument for any function ##f: S=\{1\} \rightarrow \mathbb{R}## has to be the value 1. However, if we can find a function ##f## such that ##f(1) = g(2)##, wouldn't we be able to span a space of dimension 2 without violating our rule? Thus, we could span any space as long as we can construct a function that behaves like previous equation, but for any argument. What am I misunderstanding here?

For part (b), I tried to come up with an analogy using my understanding of basis. As an example, if ##B = <\vec{e_1},\vec{e_2}> ##, namely ##B## is the basis containing the set of natural basis vectors in ##\mathbb{R}^2##, and any linear combination can be described as ##c_1\vec{e_1} + c_2 \vec{e_2}##, could we see some sort of similar behaviour where two functions ##f,g## are analogous to the coefficients ##c_1, c_2## and the arguments ##(1),(2)## are analogous to the vectors ##\vec{e_1},\vec{e_2}##? So, any two functions ##f,g## would constitute a basis of this space as long as we evaluate them with arguments ##(1)## and ##(2)## respectively?

To go on with the analogy in ## \mathbb{R}^2##, this would mean that for any function ##f: S=\{1,2\} \rightarrow \mathbb{R}##, the resulting spanned space would be some kind of 2D plane where each coordinate is defined by taking the sum of any two functions (possibly the same one) and evaluating them with the arguments ##(1)## and ##(2)##?

I know that my analogy might not be the best, but I don't know how to grasp this concept better.

Any help is more than welcome. Thanks in advance.

[Moderator's note: Moved from a technical forum and thus no template.]

Last edited by a moderator:
Delta2

PeroK
Homework Helper
Gold Member
2020 Award
Summary:: Problem interpreting a vector space of functions f such that f: S={1} -> R

Hello,

Another question related to Jim Hefferon' Linear Algebra free book. Before explaining what I don't understand, here is the problem :

View attachment 272720

I have trouble understanding how the dimension of resulting space for part (a) has to be 1 and not infinity. Generally speaking, I can't wrap my head around how this can represent a vector space.

If I understand correctly, this definition means that the only tolerated argument for any function ##f: S=\{1\} \rightarrow \mathbb{R}## has to be the value 1. However, if we can find a function ##f## such that ##f(1) = g(2)##, wouldn't we be able to span a space of dimension 2 without violating our rule? Thus, we could span any space as long as we can construct a function that behaves like previous equation, but for any argument. What am I misunderstanding here?

For (a) please give me two linearly independent functions.

fatpotato and member 587159
Office_Shredder
Staff Emeritus
Gold Member
I think the important part for (a) is that g(2) is nonsense, since 1 is the only element of the domain. I think you should try to write down some example functions.

WWGD, fatpotato and Delta2
vela
Staff Emeritus
Homework Helper
I have trouble understanding how the dimension of resulting space for part (a) has to be 1 and not infinity. Generally speaking, I can't wrap my head around how this can represent a vector space.

If I understand correctly, this definition means that the only tolerated argument for any function ##f: S=\{1\} \rightarrow \mathbb{R}## has to be the value 1. However, if we can find a function ##f## such that ##f(1) = g(2)##, wouldn't we be able to span a space of dimension 2 without violating our rule? Thus, we could span any space as long as we can construct a function that behaves like previous equation, but for any argument. What am I misunderstanding here?
Let ##V## is the vector space of functions. Then how are you concluding the dimension of ##V## is two from ##f(1)=g(2)## (which doesn't make sense for part (a) but would for the domain in (b))?

fatpotato
For (a) please give me two linearly independent functions.
Let's choose ##f(s) = \sin(s)## and ##g(s) = s^2##. I assume these functions are linearly independant since it is impossible to express one in term of the other for all possible ##s \in \mathbb{R}##.

However, in this specific case, since ##s \in \{1\}##, I think that it is possible to find coefficients ##c_1,c_2## such that ##c_1f(1) + c_2g(1) = 0## :
$$c_1 \sin(1) + c_2 = 0 \iff sin(1) = -\frac{c_2}{c_1}$$
So ##f## and ##g## are linearly dependant after all in this case...

Delta2
Office_Shredder
Staff Emeritus
Gold Member
Exactly. You actually picked these functions (in simplified form)

f(1)=sin(1)
g(1)=1

The thing about s is a distraction. Any function is entirely defined as f(1)=c for some number c.

fatpotato
Point taken for the part where ##S=\{1\}##. A basis for this space would be any function evaluated in ##s=1## and this basis vector would span ##\mathbb{R}##.

Also, would my examples even work? We are asked for functions from ##S\rightarrow \mathbb{R}## but the image of ##\sin (s)## is ##[-1;1]## and ##s^2## is ##\mathbb{R}^+##.

Now, applying the same reasoning for ##S=\{1,2\}##, seems to yield a linearly dependant combination...The basis vectors would be ##f(1),f(2)## and it is obvious that one can always be expressed from the other.

What now?

PeroK
Homework Helper
Gold Member
2020 Award
Point taken for the part where ##S=\{1\}##. A basis for this space would be any function evaluated in ##s=1## and this basis vector would span ##\mathbb{R}##.
The variable ##s## is not really needed here, since your domain has only one point. Any function on the set ##S = \{ 1 \}## is defined by a single value. So, although you can talk about ##\sin 1## etc., ultimately all you have is a single function value at a single point. Every function, therefore, is defined by this single value ##f(1)##. That means there is precisely one function for each real number. If we let ##f(1) = a## and ##g(1) = b##, then you need to show that ##f## and ##g## are linearly dependent. Hint: this should be easy!

Note: if your function is defined by this single value, then why not use that value to denote your function? For every real number ##a## we can define a function by ##a(1) = a##.

Is this set of functions really just the real numbers in a different guise?

Also, would my examples even work? We are asked for functions from ##S\rightarrow \mathbb{R}## but the image of ##\sin (s)## is ##[-1;1]## and ##s^2## is ##\mathbb{R}^+##.

Now, applying the same reasoning for ##S=\{1,2\}##, seems to yield a linearly dependant combination...The basis vectors would be ##f(1),f(2)## and it is obvious that one can always be expressed from the other.

What now?
Now you are confusing function values with basis functions/vectors. You know that every function is defined by two numbers ##f(1), f(2)##. What you have to do is find two linearly independent functions (call them ##f, g##) that span the space of all functions.

Stephen Tashi
Now, applying the same reasoning for ##S=\{1,2\}##, seems to yield a linearly dependant combination...The basis vectors would be ##f(1),f(2)## and it is obvious that one can always be expressed from the other.

In a space of functions, each basis vector must be a function. A function (in the context of the problem) is a set of ordered pairs of numbers. So a basis vector named "##f##" would be the set of ordered pairs ##f = \{\{1,f(1)\},\{2,f(2)\}\}##. By contrast, the set of numbers ##\{f(1),f(2)\}## does not denote a function that maps ##\{1,2\}## into the real numbers. So it is not correct to say that ##f(1),f(2)## are two basis vectors.

Klystron, fatpotato and PeroK
PeroK
Homework Helper
Gold Member
2020 Award
In a space of functions, each basis vector must be a function. A function (in the context of the problem) is a set of ordered pairs of numbers. So a basis vector named "##f##" would be the set of ordered pairs ##f = \{\{1,f(1)\},\{2,f(2)\}\}##. By contrast, the set of numbers ##\{f(1),f(2)\}## does not denote a function that maps ##\{1,2\}## into the real numbers. So it is not correct to say that ##f(1),f(2)## are two basis vectors.
At this level that's excessively pedantic, IMHO.

fatpotato and Mark44
Stephen Tashi
The basis vectors would be ##f(1),f(2)## and it is obvious that one can always be expressed from the other.

Your are correct that if we have two numbers ##f(1), f(2)## that we can express one of them as a multiple of the other. However, in the space of functions mapping ##\{1,2\} \rightarrow \mathbb{R}##, expressing ##f(1)## in terms of ##f(2)## does not define how to express one function in terms of another. In a manner of speaking, a relation like ##f(1) = 3f(2)## only expresses one number involved in the funtion ##f## in terms of another number involved in the same function.

If ##g## is a function in the space at hand, the notation ##f = 3g## asserts ##f## is the function ##\{\{1,3g(1)\}, \{2, 3g(2)\}\}##

So, for example, if ##f = \{\{1,5\}, \{2, 15\}\} ## the fact that ##f(2) = 3f(1)## doesn't help you if you want to express ##f## as a multiple of the function ##g = \{\{1,4\}, \{2,15\}\} ##.

Last edited:
fatpotato
It's starting to slowly sink in!

At this level that's excessively pedantic, IMHO.
I understand that Stephen Tashi's answer might be a rigorous definition for more advanced learner, but it helps to know what a basis really is. It's hard to grasp because I did not think of function "vectors" as ordered pairs, which, granted, is pretty stupid of me, since a traditional geometric vector is precisely a tuple.

Thanks to everyone for your time, I will meditate on this and try again with the exercice until I get confident with my answer.

pasmith
Homework Helper
Let $s \in S$ and consider the functions $$\phi_s : t \mapsto \begin{cases} 1 & t = s, \\ 0 & t \neq s. \end{cases}$$

vela
Staff Emeritus
Homework Helper
I understand that Stephen Tashi's answer might be a rigorous definition for more advanced learner, but it helps to know what a basis really is. It's hard to grasp because I did not think of function "vectors" as ordered pairs, which, granted, is pretty stupid of me, since a traditional geometric vector is precisely a tuple.
I'm not sure you understood what @Stephen Tashi was getting at. He was pointing out that ##f## as a whole is the vector while ##f(1)## and ##f(2)## are just pieces of ##f##. It doesn't make sense to regard ##f(1)## or ##f(2)## as a vector. This kind of gets back to the question I asked you earlier how you were going from ##f(1)=g(2)## to the vector space having dimension 2. It seemed like there was some confusion in what exactly a vector in this problem is.

Perhaps this analogy will make his point clear. Suppose you have a vector ##\vec x \in \mathbb{R}^2## so we can write
$$\vec x = \begin{pmatrix} x_1 \\ x_2\end{pmatrix}$$ where ##x_1, x_2 \in \mathbb{R}##. ##x_1## and ##x_2## are scalar components of the vector ##\vec x##. You wouldn't say ##x_1## and ##x_2## are vectors themselves.

fatpotato
It seemed like there was some confusion in what exactly a vector in this problem is.
Absolutely. When considering functions as a whole, I can reasonably well understand that it is a vector, but for some reason, I find it gets very confusing when the function is evaluated since it yields a real number.

PeroK
Homework Helper
Gold Member
2020 Award
Absolutely. When considering functions as a whole, I can reasonably well understand that it is a vector, but for some reason, I find it gets very confusing when the function is evaluated since it yields a real number.
Note that a regular vector can be seen as a function of a finite set. Let's take this example:

Perhaps this analogy will make his point clear. Suppose you have a vector ##\vec x \in \mathbb{R}^2## so we can write
$$\vec x = \begin{pmatrix} x_1 \\ x_2\end{pmatrix}$$ where ##x_1, x_2 \in \mathbb{R}##. ##x_1## and ##x_2## are scalar components of the vector ##\vec x##. You wouldn't say ##x_1## and ##x_2## are vectors themselves.

We see that ##\vec x## has two components and it looks very like a function on the set ##S = \{1, 2 \}##: $$\vec x : S \rightarrow \mathbb R$$ where $$\vec x (1) = x_1, \ \ \vec x (2) = x_2$$ In terms of abstract mathematics, the concept of a finite-dimensional vector and a function on a finite set are analagous concepts.

fatpotato
Stephen Tashi
In terms of abstract mathematics, the concept of a finite-dimensional vector and a function on a finite set are analagous concepts.

It's also interesting to look at the situation in a less abstract way. It involves human perception and culture. If a typical person in the USA sees notation like
(5,3,6)
(2,9,2)
The person perceives 6 distinct symbols and due to the cultural training associated with reading text, the person will associate an order to them that begins at the top left with "5" and goes across the page. So the person's brain creates a mapping that defines the "first", "second" .... symbols.

For the sake of writing rigorous proofs in mathematics, it is useful to state properties explicitly, rather than relying on features of notation that depend on culture and the psychology of perceiving notation. Of course, given that the notation of any kind of writing assumes cultural conventions and "psycho-perceptions" on the part of the reader, this noble goal cannot be completely realized. However, it is pursued whenever the logic of proofs needs to talk about something in a culture independent way. So the formal definition of 3-tuple of real numbers is a mapping from the set ##\{1,2,3\}## into the real numbers. This definition allows that readers of the proof may come from cultures that read symbols from right to left or read them from top to bottom in a column etc.

fatpotato
Note that a regular vector can be seen as a function of a finite set. Let's take this example:

We see that ##\vec x## has two components and it looks very like a function on the set ##S = \{1, 2 \}##: $$\vec x : S \rightarrow \mathbb R$$ where $$\vec x (1) = x_1, \ \ \vec x (2) = x_2$$ In terms of abstract mathematics, the concept of a finite-dimensional vector and a function on a finite set are analagous concepts.
Thank you very much for all your explanations! It's finally clear in my mind.

It's also interesting to look at the situation in a less abstract way. It involves human perception and culture.

...

Interesting post. I wish explicit stating were the norm, I have been misled many times by inconsistent symbol choices.