Tutorials › Linear Algebra › Real-Valued Function Spaces

Vector Spaces and Subspaces · Tutorial 279 of 1000

Real-Valued Function Spaces

Learn to define pointwise operations on functions and verify when collections of real-valued functions satisfy the vector-space axioms.

Intermediate 10 min read

What You'll Learn

  • Define pointwise addition and scalar multiplication for real-valued functions on a fixed domain
  • Identify the zero function and additive inverse in a function space
  • Verify the vector-space axioms by evaluating functions at each input
  • Show that bounded functions form a vector space under pointwise operations
  • Explain why continuous functions on an interval form a vector space
  • Recognize why nonnegative functions do not form a vector space

Functions as Vectors

A vector need not be an ordered list of numbers. In a vector space, the objects being added may be functions, provided addition and scalar multiplication obey the vector-space axioms. For functions, the natural operations are defined one input at a time: add the output values, or multiply each output by the scalar. The domain must stay fixed so that the functions being combined have the same inputs.

Let \(D\) be any set, and consider functions from \(D\) to \(\mathbb{R}\). Two such functions are equal when they have the same value at every element of \(D\). This pointwise test for equality lets us check identities between functions by evaluating both sides at an arbitrary input. If \(D\) is empty, there is one function from \(D\) to \(\mathbb{R}\), the empty function; pointwise identities then hold vacuously.

Definition: For functions \(f,g:D\to\mathbb{R}\) and a scalar \(c\in\mathbb{R}\), define their pointwise sum and scalar multiple by \( (f+g)(x)=f(x)+g(x) \) and \( (cf)(x)=c f(x) \) for every \(x\in D\). The zero function \(0_D\) is defined by \(0_D(x)=0\) for every \(x\in D\), and the additive inverse of \(f\) is the function \((-f)(x)=-f(x)\).

Write \(\mathbb{R}^D\) for the set of all functions \(f:D\to\mathbb{R}\), equipped with these operations. To show that it is a real vector space, we must check closure under the operations, the rules for addition and scalar multiplication, and the existence of a zero function and additive inverses. The checks reduce to familiar arithmetic in \(\mathbb{R}\) because functions are equal exactly when their values agree at every input.

Why All Real-Valued Functions Form a Vector Space

Theorem: For any set \(D\), the set \(\mathbb{R}^D\) of all functions from \(D\) to \(\mathbb{R}\), with pointwise addition and scalar multiplication, is a real vector space.

Proof. Let \(f,g,h\in\mathbb{R}^D\) and \(a,b\in\mathbb{R}\). The pointwise sum \(f+g\) is again a function \(D\to\mathbb{R}\), since \(f(x)+g(x)\in\mathbb{R}\) for each \(x\in D\). Likewise, \(af\) is a function \(D\to\mathbb{R}\), since \(a f(x)\in\mathbb{R}\). Thus both operations are closed in \(\mathbb{R}^D\).

For each \(x\in D\), real-number addition gives \((f+g)(x)=f(x)+g(x)=g(x)+f(x)=(g+f)(x)\), and \(((f+g)+h)(x)=(f(x)+g(x))+h(x)=f(x)+(g(x)+h(x))=(f+(g+h))(x)\). Hence function addition is commutative and associative. The function \(0_D\) satisfies \((f+0_D)(x)=f(x)+0=f(x)\), so \(f+0_D=f\). Also, \((f+(-f))(x)=f(x)-f(x)=0=0_D(x)\), so every \(f\) has an additive inverse.

For the scalar rules, evaluation at each \(x\) gives \((a(f+g))(x)=a(f(x)+g(x))=af(x)+ag(x)=(af+ag)(x)\), and \(((a+b)f)(x)=(a+b)f(x)=af(x)+bf(x)=(af+bf)(x)\). The associative scalar rule follows from \((a(bf))(x)=a(bf(x))=(ab)f(x)=((ab)f)(x)\). Finally, \((1f)(x)=1f(x)=f(x)\). These are all the vector-space axioms, so \(\mathbb{R}^D\) is a real vector space. If \(D\) is empty, the same identities hold because there are no inputs at which they could fail. \(\square\)

This proof also explains the role of pointwise operations: every function identity reduces to a real-number identity at each input. It does not mean the functions themselves are real numbers; it means their values can be compared input by input. In particular, the zero vector of this space is the zero function, not an input \(x=0\) and not a function that is zero at just one point.

Worked Example: Operations on a Finite Domain

Let \(D=\{-1,0,2\}\), and define \(f(x)=x+1\) and \(g(x)=2-x\) for \(x\in D\). Compute \(f+g\), \(2f-g\), and the additive inverse of \(f\).

Evaluate both functions at each input:

$$ \begin{array}{c|ccc} x & -1 & 0 & 2\\ \hline f(x)=x+1 & 0 & 1 & 3\\ g(x)=2-x & 3 & 2 & 0 \end{array} $$

By pointwise addition, \((f+g)(x)=f(x)+g(x)=(x+1)+(2-x)=3\), so \(f+g\) is the constant function with value \(3\). For the second operation, \((2f-g)(x)=2f(x)-g(x)=2(x+1)-(2-x)=3x\). Its values at \(-1,0,2\) are \(-3,0,6\). The additive inverse has values \((-f)(x)=-f(x)=-(x+1)\), which gives \(-f(-1)=0\), \(-f(0)=-1\), and \(-f(2)=-3\).

Check: At the three inputs, \(f+g\) has values \(0+3=3\), \(1+2=3\), and \(3+0=3\). Also \(2f-g\) has values \(2(0)-3=-3\), \(2(1)-2=0\), and \(2(3)-0=6\). Adding each value of \(-f\) to the corresponding value of \(f\) gives \(0\), as required.

Collections Defined by a Property

Often we care about a collection of functions with an additional property, such as being bounded or continuous. To verify that such a collection is a vector space, it is not enough that its members are functions. The operations must keep the results in that collection. Once this closure is established, the other vector-space axioms can be checked by the same pointwise calculations used for \(\mathbb{R}^D\).

Definition: A function \(f:D\to\mathbb{R}\) is bounded if there is a real number \(M\geq 0\) such that \(|f(x)|\leq M\) for every \(x\in D\). Let \(B(D)\) be the set of all bounded real-valued functions on \(D\).
Theorem: For any set \(D\), \(B(D)\) is a real vector space under pointwise addition and scalar multiplication.

Proof. The zero function is bounded, with bound \(M=0\). Suppose \(f,g\in B(D)\), with bounds \(M_f,M_g\geq 0\). For every \(x\in D\), the triangle inequality gives \(|(f+g)(x)|=|f(x)+g(x)|\leq |f(x)|+|g(x)|\leq M_f+M_g\). Thus \(f+g\) is bounded. For any \(a\in\mathbb{R}\), \(|(af)(x)|=|a||f(x)|\leq |a|M_f\), so \(af\) is bounded. In particular, the bound is \(0\) when \(a=0\). The remaining vector-space identities hold because \(B(D)\) is contained in \(\mathbb{R}^D\), where they have already been proved; each operation involved stays in \(B(D)\) by the bounds just shown. Therefore \(B(D)\) is a real vector space. \(\square\)

Worked Example: Combining Bounded Functions

On \(D=\mathbb{R}\), let \(f(x)=\frac{1}{1+x^2}\) and \(g(x)=\frac{x^2}{1+x^2}\). Show that \(f+g\) and \(2f-3g\) are bounded.

Since \(x^2\geq 0\), the denominator \(1+x^2\) is at least \(1\), so \(0\leq f(x)\leq 1\). Also \(0\leq g(x)\leq 1\), because \(x^2\leq 1+x^2\). Their sum simplifies to \((f+g)(x)=\frac{1+x^2}{1+x^2}=1\), so it is bounded by \(1\). The other combination is \((2f-3g)(x)=\frac{2-3x^2}{1+x^2}\). Using \(t=x^2\geq 0\), we have \(|2-3t|\leq 2+3t\leq 3+3t=3(1+t)\). Dividing by \(1+t>0\) gives \(|(2f-3g)(x)|\leq 3\).

Check: At \(x=0\), \(f(0)=1\), \(g(0)=0\), and \(2f(0)-3g(0)=2\), which lies between \(-3\) and \(3\). At \(x=1\), \(f(1)=g(1)=\frac12\), so \(2f(1)-3g(1)=-\frac12\), also within the bound. The inequalities above verify the bound for every real input, not only these checks.

Continuous Functions on an Interval

Let \(I\) be an interval in \(\mathbb{R}\). A function \(f:I\to\mathbb{R}\) is continuous at \(a\in I\) if, for every \(\varepsilon>0\), there is a \(\delta>0\) such that \(x\in I\) and \(|x-a|<\delta\) imply \(|f(x)-f(a)|<\varepsilon\). It is continuous on \(I\) if it is continuous at every \(a\in I\). Write \(C(I)\) for the set of continuous real-valued functions on \(I\).

Theorem: For any interval \(I\), \(C(I)\) is a real vector space under pointwise addition and scalar multiplication.

Proof. The zero function is continuous, since its change between any two inputs is \(0\). To prove closure under addition, let \(f,g\in C(I)\), fix \(a\in I\), and choose \(\varepsilon>0\). Continuity of \(f\) at \(a\) gives \(\delta_f>0\) such that \(|f(x)-f(a)|<\varepsilon/2\) whenever \(x\in I\) and \(|x-a|<\delta_f\). Continuity of \(g\) gives \(\delta_g>0\) with the corresponding bound for \(g\). Set \(\delta=\min(\delta_f,\delta_g)\). If \(|x-a|<\delta\), then \[ |(f+g)(x)-(f+g)(a)| \leq |f(x)-f(a)|+|g(x)-g(a)| <\varepsilon/2+\varepsilon/2=\varepsilon. \] Thus \(f+g\) is continuous at \(a\).

For scalar multiplication, fix \(c\in\mathbb{R}\). If \(c=0\), then \(cf\) is the zero function and is continuous. If \(c\ne 0\), continuity of \(f\) at \(a\), applied with \(\varepsilon/|c|>0\), supplies a \(\delta>0\) such that \(|x-a|<\delta\) implies \(|(cf)(x)-(cf)(a)|=|c||f(x)-f(a)|<|c|(\varepsilon/|c|)=\varepsilon\). So \(cf\) is continuous at \(a\). Since \(a\) was arbitrary, both operations preserve continuity. The other vector-space axioms hold by the pointwise identities already proved for \(\mathbb{R}^I\). Hence \(C(I)\) is a real vector space. \(\square\)

Worked Example: Combining Continuous Functions

On \(I=[-1,1]\), let \(f(x)=|x|\) and \(g(x)=x\). Compute \(f+g\) and \(-2f\), and confirm that the resulting functions are continuous.

The absolute-value function is continuous: the inequality \(||x|-|y||\leq |x-y|\) shows that a change of less than \(\varepsilon\) in the input changes \(|x|\) by less than \(\varepsilon\). The identity function is continuous because \(|x-y|\) is exactly the change in its output. For \(x\in[-1,0]\), \(|x|=-x\), while for \(x\in[0,1]\), \(|x|=x\). Therefore \((f+g)(x)=0\) on \([-1,0]\), and \((f+g)(x)=2x\) on \([0,1]\). Also, \((-2f)(x)=-2|x|\), which is continuous by the scalar-closure result.

Check: At \(x=-1,0,1\), \(f+g\) has values \(0,0,2\), respectively, and \(-2f\) has values \(-2,0,-2\). At \(x=0\), the two formulas for \(f+g\) both give \(0\); there is no jump where the piecewise descriptions meet.

Common Mistake: A Property Is Not Enough

A tempting claim is that the set of nonnegative functions on \(D\) is a vector space, because sums of nonnegative functions are nonnegative. That checks only one operation. For a concrete failure, take \(D=\mathbb{R}\) and \(f(x)=1\). This function is nonnegative, but multiplying it by the real scalar \(-1\) gives \((-1)f(x)=-1\), which is negative at every input. Thus the set is not closed under scalar multiplication and is not a real vector space. To correct the mistake, check every required operation: real scalars include negative numbers, and additive inverses must remain in the collection.

The fixed-domain condition matters as well. If \(f:D\to\mathbb{R}\) and \(g:E\to\mathbb{R}\) have different domains, the pointwise sum \(f+g\) has not been defined by the rule above unless a common domain and a suitable interpretation are specified. For a function space, first identify the domain, then define the operations, then verify closure and the axioms.

CollectionPointwise operationsReason
All functions \(D\to\mathbb{R}\)Form a real vector spaceEvery operation produces a function on \(D\), and real arithmetic verifies the axioms
Bounded functions \(D\to\mathbb{R}\)Form a real vector spaceTriangle inequality and scalar bounds preserve boundedness
Continuous functions \(I\to\mathbb{R}\)Form a real vector spaceEpsilon-delta estimates preserve continuity under sums and scalar multiples
Nonnegative functions \(D\to\mathbb{R}\)Do not form a real vector spaceMultiplication by \(-1\) can leave the collection

Check Your Understanding

Use pointwise operations and the definition of a vector space to justify each answer.

  1. For \(f(x)=x^2\) and \(g(x)=1-x\) on \(D=\{0,1,2\}\), find \(f+g\) and \(3f\) by listing their values at each input.
  2. Give the zero function and additive inverse of \(f(x)=2x-1\) on \(D=\mathbb{R}\).
  3. If \(f\) is bounded by \(M\geq 0\), what bound works for \(cf\), where \(c\in\mathbb{R}\)?
  4. Explain why the collection of nonpositive functions is not a real vector space.
  5. In proving that sums of continuous functions are continuous, why is it useful to assign an error tolerance of \(\varepsilon/2\) to each function?

Test yourself: Linear Algebra final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon