# How can this linear function output two values?

I am trying to understand the basics of linear functions and vectors, my reference book is this from the site of the University of California.

On Page 16 a visual description for linear functions is given. I can understand that $x$ as input to a linear function can output $10x$ but how can inputting a polynomial $p$ into a function give an output of two integral functions ? Which are

$\int_{-1}^{1}p(y)dy$

and

$\int_{-1}^{1}yp(y)dy$

I must be missing something but how can a function output two values or two functions ? I can understand the intuition that a particular polynomial can satisfy both the above integrals but then according to the visualization provided it shows that it outputs two values.

What is the linear function that is described in text ? I believe the definition of a function is that it is just a rule that maps a value from one domain to another domain.

So how can a polynomial map to a function ? Shouldn't the input and output both be functions/polynomials ?

Please note I am a complete beginner to pure mathematics and am learning these concepts on my own.

A function $f:A\to B$ is defined to be some sort of a "machine" that takes elements from a set $A$ and matches to each one an element from a set $B$. Here you can take $A$ to be the set of real polynomials and $B$ to be $\mathbb{R}^2$, meaning that every polynomial is matched (through the function $f$) to an element in $\mathbb{R}^2$.

Side Note: if you don't know what $\mathbb{R}^2$ is, it is a set of paired numbers:

$$\mathbb{R}^2 = \{ (a,b) | a,b\in \mathbb{R} \}$$

For example you can find there the elements $(1,4)$,$(2,0)$,$(-3,0.5)$,$(\pi , 2.365)$ etc...

Lets take a less complicated function to clarify the principle.

Let $f$ be a function from the polynomials to $\mathbb{R^2}$ such that: $$f(p) = (p(0), p(1))$$ This is a valid function, for each polynomial it matches a unique point in $\mathbb{R}^2$. For example: $$f(x^2)=(0,1)$$ $$f(3x^4-9x^2+1) = (1,-5)$$

Your function in the text book is similar, the difference is the mechanism of matching: not by substituting a number into the polynomial but calculating an integral. I hope this helped!

• Thanks so much this helped a lot. Commented Jun 27, 2017 at 8:56

It takes a polynomial as input, and gives a single object as output: a vector in $$\mathbb{R}^{2}$$ whose coordinates are given by the two integrals.

A function, given an input, gives exactly one output. But this output can be any kind of object (including a vector with lots of entries in it). It is also fine for the output of a function to be another function, but in this case the two integrals each give a real number determined by the function $$p(y)$$, so the output is not a function.

A bigger point: find a real book, something like this is probably not good for a first introduction to linear algebra. The book Linear Algebra and it's Applications by David Lay is a standard first book for someone who doesn't have much experience with proofs.

It is absolutely possible to have a function (or: operator) which has one input and two outputs. It can even be linear. Let's take the example: $$F(p) = \left( \begin{array}{c} \int_{-1}^{1} p(y)\, dy \\ \int_{-1}^{1}y p(y)\, dy \\ \end{array} \right)$$ Note that the output is a vector whose component are scalars, given the input function $p=p(y)$. A little bit less obvious is that $F(p)$ is a linear operator. Let's show it. Firstly, $$F(\alpha p) = \left( \begin{array}{c} \int_{-1}^{1} \alpha p(y)\, dy \\ \int_{-1}^{1}y \alpha p(y)\, dy \\ \end{array} \right) = \alpha \left( \begin{array}{c} \int_{-1}^{1} p(y)\, dy \\ \int_{-1}^{1}y p(y)\, dy \\ \end{array} \right) = \alpha F(p)$$ where $\alpha$ is a real number. Secondly, if $p$ and $q$ are functions of $y$, $$F(p+q) = \left( \begin{array}{c} \int_{-1}^{1} (p(y) + q(y))\, dy \\ \int_{-1}^{1} (y p(y) + yq(y))\, dy \\ \end{array} \right) = \left( \begin{array}{c} \int_{-1}^{1} p(y) \, dy + \int_{-1}^{1} q(y) \, dy \\ \int_{-1}^{1} y p(y)\, dy + \int_{-1}^{1} yq(y)\, dy \\ \end{array} \right) = \left( \begin{array}{c} \int_{-1}^{1} p(y) \, dy \\ \int_{-1}^{1} y p(y)\, dy \end{array} \right) + \left( \begin{array}{c} \int_{-1}^{1} q(y) \, dy \\ \int_{-1}^{1} y q(y)\, dy \end{array} \right) = F(p) + F(q)$$ These two features were the requirements for a linear operator, proving that $F$ is a linear operator. It just looks funny because it involves integration.

• P How is the output a scalar ? The output according to the text is a 2-vector. And also the function can be linear if one additive property is satisfied, ie. the summation of the output vectors individually are equal to the result of the function with the added values. Commented Jun 27, 2017 at 9:17
• Ah, sorry, it was a small brain-fart. What I meant is that the elements of the vector are scalars and not, for example, functions. Commented Jun 27, 2017 at 9:40
• Beg to disagree. The output are integral functions of polynomials. So aren't they vectors ? Are you referring to the fact that when the integral is calculated scalars are produced ie. 0 and 1? If so then even the real numbers can be vectors. They are all vectors. Commented Jun 27, 2017 at 9:49