Functions in linear algebra

Vol

Junior Member
Joined
May 23, 2018
Messages
51
How are functions also vectors in linear algebra? In what way? Are there examples? Just can't figure out how functions can be vectors too. I need details. Can anybody help?
 
How are functions also vectors in linear algebra? In what way? Are there examples? Just can't figure out how functions can be vectors too. I need details. Can anybody help?
What is the context of your query?

Can you post the exact problem statement?
 
How are functions also vectors in linear algebra? In what way? Are there examples? Just can't figure out how functions can be vectors too. I need details. Can anybody help?
A function is merely a relationship between two sets. There is no reason that the elements of one or both of the sets cannot be vectors.
 
Last edited:
How are functions also vectors in linear algebra? In what way? Are there examples? Just can't figure out how functions can be vectors too. I need details. Can anybody help?
Let T: R^2 --> R^2 defined by T (a,b) = (b,a). This mapping is 1-1 and onto.

We can view elements in the pre-image as vectors (in R^2) just like we can consider the elements in the range as vectors (in R^2). After all what does a 2-dimensional vector look like?
 
How are functions also vectors in linear algebra? In what way? Are there examples? Just can't figure out how functions can be vectors too. I need details. Can anybody help?

You'll need to clarify what you have in mind. Are you saying you have been told that that any function can be thought of as a vector, or that any vector can be thought of as a function, or that functions can have vectors as inputs or as outputs (as others have been assuming), or something else? I have some thoughts, but I can't tell if they are what you are asking about without more details from you.

Please show what prompted your question, stating in full whatever theorem or definition or whatever it is that you are wondering about.
 
Vol

You'll need to clarify what you have in mind. Are you saying you have been told that that any function can be thought of as a vector, or that any vector can be thought of as a function, or that functions can have vectors as inputs or as outputs (as others have been assuming), or something else? I have some thoughts, but I can't tell if they are what you are asking about without more details from you.

Please show what prompted your question, stating in full whatever theorem or definition or whatever it is that you are wondering about.

Can any function be thought of as a vector and vice versa? How? I can see that a function is a map between the x domain and the y domain? But what are the domains of a vector? Isn't a vector a tail somewhere and a head somewhere?
 
Can any function be thought of as a vector and vice versa? How? I can see that a function is a map between the x domain and the y domain? But what are the domains of a vector? Isn't a vector a tail somewhere and a head somewhere?

Please quote what you were told about this. I need to see the specific context.

A function on a finite domain can be thought of as an ordered n-tuple, and therefore a vector (with vector operations identical to pointwise operations on the functions); on an infinite domain, the set of functions constitute an infinite-dimensional vector space. (This is just off the top of my head, and I may not be saying everything in the best way.) Does that sound like what you're referring to? This is a very different perspective on vectors than mere arrows, so it sounds like this may be beyond what you are learning. See Wikipedia for more particulars.

If that's not what you have in mind, we should be able to help more once you make the context clear.
 
Vectors

Yes. I thought vectors were arrows in 2 dimensions or more. With direction and length. But you are saying they can be something else? How? Thanks.
 
Yes. I thought vectors were arrows in 2 dimensions or more. With direction and length. But you are saying they can be something else? How? Thanks.

Please, as I asked, tell us why you are asking this. Who told you that "functions are also vectors in linear algebra"? What was it that they said? We can't answer your question well without knowing what your background is, and what the question means to you.

Linear algebra is the study of "vector spaces", which are sets of objects that behave in some (well defined) sense like the "arrow" vectors you are familiar with. This broader sense of "vector" is highly abstract, and allows us to discuss many things far beyond 2 and 3 dimensions, and with meanings far removed from geometry. From the link I gave you, you should be able to get to explanations of various aspects of this, if you are interested.

But if you have never heard of these ideas, then all of this will be meaningless to you (until you take the time to study it). If you answer our questions, we can try to adapt the answer to what you do know, and to the reason you asked the question and said you "need details".
 
Can any function be thought of as a vector and vice versa? How? I can see that a function is a map between the x domain and the y domain? But what are the domains of a vector? Isn't a vector a tail somewhere and a head somewhere?
Vectors can be thought of as an ordered set of n numbers. You can do math with them according to certain rules, and you can define functions among them.

\(\displaystyle f(x,\ y) = z\) can be thought of and written as \(\displaystyle f(\vec w) = z,\)

where \(\displaystyle \vec w\) is a vector made up of a pair of numbers where order matters. This is a very simple example.

https://en.wikipedia.org/wiki/Vector_space
 
Vectors can be thought of as an ordered set of n numbers. You can do math with them according to certain rules, and you can define functions among them.

\(\displaystyle f(x,\ y) = z\) can be thought of and written as \(\displaystyle f(\vec w) = z,\)

where \(\displaystyle \vec w\) is a vector made up of a pair of numbers where order matters. This is a very simple example.

https://en.wikipedia.org/wiki/Vector_space

I'm not sure that functions of vectors quite answer your question about functions being vectors; but that page is the one I expected you to go to next after the page I linked to; and the short section there on function spaces talks about how functions in general can form a vector space, and how the specific case of polynomials of a given degree form a vector space. In the latter case, it is easier to see how a polynomial corresponds to an ordered (n+1)-tuple of numbers, which is very close to what you think of as a vector.

The important thing is that functions behave like vectors: you can add two functions by adding their values for a given input, just as you add two vectors by adding corresponding components; and similarly you can multiply a function by a scalar.
 
vectors

Please, as I asked, tell us why you are asking this. Who told you that "functions are also vectors in linear algebra"? What was it that they said? We can't answer your question well without knowing what your background is, and what the question means to you.

Linear algebra is the study of "vector spaces", which are sets of objects that behave in some (well defined) sense like the "arrow" vectors you are familiar with. This broader sense of "vector" is highly abstract, and allows us to discuss many things far beyond 2 and 3 dimensions, and with meanings far removed from geometry. From the link I gave you, you should be able to get to explanations of various aspects of this, if you are interested.

But if you have never heard of these ideas, then all of this will be meaningless to you (until you take the time to study it). If you answer our questions, we can try to adapt the answer to what you do know, and to the reason you asked the question and said you "need details".

I am just trying to see how calculus, differential equations, and linear algebra fit together. Sounds like you are saying a vector and a function are similar in that they are both ordered pairs, at least in the cartesian plane, 2-D. A function is an ordered pair in the sense that you put in x and get y out. So, you get (x,y). A vector in 2-D is also an ordered pair. Like <1,1>. A function is an operation. I guess a vector is too. But they are different? :D
 
… A function is an operation. I guess a vector is too. But they are different?
I would say that a function is a relationship (between two sets of numbers) and a vector is a special kind of number.

For most functions, the relationship may be stated four ways: algebraically (formula), graphically (behavior image), numerically (table of values), or descriptively (complete sentences). If I think about mapping individual inputs to their corresponding outputs, then that modeling action is an operation, sure. But the relationship doesn't need to be mapped; the function exists, without "operating" on inputs.

Vectors are special numbers. They each contain a direction, in addition to a numerical value.

Working with functions and vectors, using things like notations, components, models, and processes, we see numerous common traits between functions and vectors. This fact doesn't blend the definitions of function and vector, for me. :cool:
 
I am just trying to see how calculus, differential equations, and linear algebra fit together. Sounds like you are saying a vector and a function are similar in that they are both ordered pairs, at least in the cartesian plane, 2-D. A function is an ordered pair in the sense that you put in x and get y out. So, you get (x,y). A vector in 2-D is also an ordered pair. Like <1,1>. A function is an operation. I guess a vector is too. But they are different? :D

So, no one told you that functions are vectors, you just thought that must be true for some reason? It's not at all obvious to me that it should be true, but, as I've tried to explain, it is. I take it you know at least something about calculus and differential equations; do you know anything about linear algebra?

First, a vector is not an ordered pair. In the sense you know about, it can be a pair or a triple (in three dimensions); but you can extend that idea to any number of dimensions. We do that in linear algebra, not primarily because we want to think about higher-dimensional geometry, but because we want to solve systems of linear equations in any number of variables. So a vector is an ordered n-tuple, like (x1, x2, x3, x4, x5) or something, where n is called the dimension of the vector (or its "space").

Linear algebra takes this even further, defining a general concept called a "vector space", which is basically any set of things that can be added and multiplied by a scalar in a way that has the same properties as vector addition and scalar multiplication. You can read about this concept in the Wikipedia article you have already been referred to. It turns out that there is a lot more you can do with these than you probably know, much of it using matrices. One important thing is that you don't have to start with objects that are written as n-tuples, or that can be seen as arrows; the ideas of components and dimensions arise out of more basic ideas, so that something you wouldn't have thought of as having components, does. And it turns out that you can take (almost) any set of n "basis elements" and express any vector as an n-tuple in terms of them.

Linear algebra can be taken even further (in grad school), where you can treat any function as a member of a vector space, which is very different from equating it to a mere arrow. At this point you're far beyond what you know now. I can't possibly make it understood until you have at least studied rather deeply in linear algebra. And up in that realm, calculus joins in; you can talk about linear properties of derivatives, and things like differentiable functions become a vector space. This is mentioned in the section here, and also in the last paragraph on history.

But here's the lower level case I tried at one point to illustrate. Rather than a function of a real variable, which requires that high-level stuff, consider a function whose domain has only three elements, let's say 1, 2, and 3. Then any function of this sort will be entirely defined by a table with three rows, or equivalently three ordered pairs: (0, f(0)), (1, f(1)), and (2, f(2)). That is, once you've listed the values of the function for its three inputs, you have defined the function. But that means that any function can be defined by an ordered triple, (f(0), f(1), f(2)). For example, the ordered triple (5, 2, 7) corresponds to the function such that f(1) = 5, f(2) = 2, and f(3) = 7.

When we add functions, we just add their values; the function h = f+g is defined by h(x) = f(x) + g(x). So if I define two functions by the triples (5, 2, 7) and (-1, 6, 3), their sum is the function (5 + -1, 2 + 6, 7 + 3) = (4, 8, 10). Do you see that the addition of functions is exactly the same as the addition of vectors? You can say the same thing about scalar multiplication, like 2f = (10, 4, 14). So each function on my tiny domain is equivalent to a vector.

Now, to do this with a function whose domain is the real numbers (or any interval of them), you'd have to think of it as an "infinituple" -- it will have infinitely many dimensions. So before you can do that, you have to have gone far enough in linear algebra to accept that possibility. In particular, you have to realize that you don't have to write out all the components of a vector in order to define it!

Now, "operation" has a particular definition, and it isn't quite right to say that a function is an operation. And I can't think of any natural sense in which a vector as you know it "is" an operation. But I hope you can see that a vector as you know it can be seen as a sort of function with a very small domain, and that you can imagine making this idea very much bigger as you go deeper into math.

There may be other connections, and if you would tell us more about the specific things that motivated your speculation, we might give very different answers. (I think of the child who asks his parents what sex is, and gets a long and involved explanation, but then tells them he only wanted to know whether to check M or F on a form. This is why the context of a question is important.)
 
How are functions also vectors in linear algebra? In what way? Are there examples? Just can't figure out how functions can be vectors too. I need details. Can anybody help?
You ask specifically about "linear algebra" but you later say "I thought vectors were arrows in 2 dimensions or more." How much linear algebra have you studied? At the very beginning of a linear algebra course you should see the definition of "vector space":

A vector space is a collection of objects, called vectors, together with two operations "addition" and "scalar multiplication" having certain properties (I won't list them all here, you can see them at http://mathworld.wolfram.com/VectorSpace.html)

"arrows in 2 dimensions or more", with the standard definitions for adding them and multiplying by scalars do form a "vector space" in this sense but so do many other things. We can define the addition of two vectors, f and g, as (f+ g)(x)= f(x)+ g(x) and multiplication by numbers by (af)(x)= af(x). Those operation satisfy all the conditions for a "vector space".
 
Top