Tutorials › Linear Algebra › Worked Classification of Matrix and Function-Space Maps

Linear Maps Between Vector Spaces · Tutorial 423 of 1000

Worked Classification of Matrix and Function-Space Maps

Work out how trace, transpose, and point evaluation act as linear maps, including which outputs they can attain and how to describe their kernels.

Intermediate 9 min read

What You'll Learn

  • Verify linearity of the trace and transpose maps by their entrywise definitions.
  • Describe the kernel and image of the trace map on square matrices.
  • Explain why the transpose map is one-to-one and onto, including for rectangular matrix spaces.
  • Identify the kernel and attainable outputs of point evaluation on a space of functions.
  • Find every polynomial in \(\mathbb{P}_2\) with two prescribed point values.
  • Recognize why the image of an evaluation map depends on its function space.

Classifying Maps by Their Outputs

A linear map is not fully understood once its formula has been written down. We also want to know which outputs it can produce, which inputs produce the zero output, and whether an output determines its input uniquely. These questions are especially concrete for maps defined by familiar operations: taking the trace or transpose of a matrix, or evaluating a function at a point.

Throughout, the scalar field is \(\mathbb{R}\). For a linear map \(T:V\to W\), its kernel is \(\ker T=\{\mathbf{v}\in V:T(\mathbf{v})=\mathbf{0}\}\), and its image is \(\operatorname{im}T=\{T(\mathbf{v}):\mathbf{v}\in V\}\). The kernel records the inputs sent to zero; the image is exactly the set of attainable outputs. The map is one-to-one if different inputs always give different outputs, and onto if every element of the codomain is attained.

Definition: A map \(T:V\to W\) between real vector spaces is linear if \(T(a\mathbf{u}+b\mathbf{v})=aT(\mathbf{u})+bT(\mathbf{v})\) for all \(\mathbf{u},\mathbf{v}\in V\) and all \(a,b\in\mathbb{R}\). To classify a map, check this condition, determine its kernel and image, and distinguish outputs that are attainable from those that are not.

The Trace Map

For a square matrix, the trace is the sum of the diagonal entries. Fix \(n\geq 1\) and define \(\tau:\mathbb{R}^{n\times n}\to\mathbb{R}\) by \(\tau(\mathbf{A})=\operatorname{tr}\mathbf{A}\). The output is a scalar, so this map asks for one particular summary of the matrix rather than the matrix itself.

Theorem: The trace map \(\tau:\mathbb{R}^{n\times n}\to\mathbb{R}\) is linear, its kernel consists of the trace-zero matrices, and its image is all of \(\mathbb{R}\).

Proof. Write \(\mathbf{A}=(a_{ij})\) and \(\mathbf{B}=(b_{ij})\). For \(a,b\in\mathbb{R}\), the \(i\)th diagonal entry of \(a\mathbf{A}+b\mathbf{B}\) is \(aa_{ii}+bb_{ii}\). Summing over \(i=1,\dots,n\) gives \(\operatorname{tr}(a\mathbf{A}+b\mathbf{B})=a\operatorname{tr}\mathbf{A}+b\operatorname{tr}\mathbf{B}\), proving linearity. By the definition of the kernel, \(\ker\tau=\{\mathbf{A}:\operatorname{tr}\mathbf{A}=0\}\). To prove that every real number is attained, let \(y\in\mathbb{R}\) and take the matrix with \(y\) in its first diagonal position and zeros elsewhere. Its trace is \(y\), so \(y\in\operatorname{im}\tau\). Since the codomain is \(\mathbb{R}\), this proves \(\operatorname{im}\tau=\mathbb{R}\). \(\square\)

Worked Example: All Matrices with a Given Trace

For \(\tau:\mathbb{R}^{2\times2}\to\mathbb{R}\), find every matrix whose trace is \(5\), and verify one example.

Write an arbitrary matrix as \(\mathbf{A}=\begin{bmatrix}a&b\\c&d\end{bmatrix}\). The equation \(\operatorname{tr}\mathbf{A}=5\) means \(a+d=5\), so \(d=5-a\), while \(b\) and \(c\) can be any real numbers. Thus all such matrices are

$$ \mathbf{A}= \begin{bmatrix} a&b\\ c&5-a \end{bmatrix}, \qquad a,b,c\in\mathbb{R}. $$

For instance, choose \(a=2\), \(b=1\), and \(c=-3\). This gives \(\mathbf{A}=\begin{bmatrix}2&1\\-3&3\end{bmatrix}\). Its trace is \(2+3=5\), as required. More generally, the full set of inputs producing any specified output \(y\) is \(\begin{bmatrix}y&0\\0&0\end{bmatrix}+\ker\tau\): adding a trace-zero matrix changes the input without changing the output.

This example makes the difference between image and kernel visible. Every real output is attainable, but most outputs come from many different matrices. For example, the trace alone does not determine either off-diagonal entry. The zero output is attained precisely by the matrices whose diagonal entries sum to zero.

The Transpose Map

For positive integers \(m,n\), the transpose sends an \(m\times n\) matrix to an \(n\times m\) matrix by exchanging rows and columns. Define \(\mathcal{T}:\mathbb{R}^{m\times n}\to\mathbb{R}^{n\times m}\) by \(\mathcal{T}(\mathbf{A})=\mathbf{A}^{\top}\). The codomain matters: when \(m\ne n\), the transpose is not a map from \(\mathbb{R}^{m\times n}\) back into that same matrix space.

Theorem: The transpose map \(\mathcal{T}:\mathbb{R}^{m\times n}\to\mathbb{R}^{n\times m}\) is linear and is both one-to-one and onto. Its kernel is \(\{\mathbf{O}\}\), and its image is \(\mathbb{R}^{n\times m}\).

Proof. For matrices \(\mathbf{A},\mathbf{B}\in\mathbb{R}^{m\times n}\), scalars \(a,b\in\mathbb{R}\), and indices \(i,j\), the \((i,j)\) entry of \((a\mathbf{A}+b\mathbf{B})^{\top}\) is \(aa_{ji}+bb_{ji}\). This is the \((i,j)\) entry of \(a\mathbf{A}^{\top}+b\mathbf{B}^{\top}\), so the two matrices are equal and \(\mathcal{T}\) is linear. If \(\mathbf{A}^{\top}=\mathbf{O}\), transposing both sides gives \(\mathbf{A}=\mathbf{O}\), so the kernel contains only the zero matrix. For any \(\mathbf{C}\in\mathbb{R}^{n\times m}\), take \(\mathbf{A}=\mathbf{C}^{\top}\in\mathbb{R}^{m\times n}\). Then \(\mathcal{T}(\mathbf{A})=\mathbf{C}^{\top\top}=\mathbf{C}\), proving that every codomain matrix is attained. Finally, if \(\mathbf{A}^{\top}=\mathbf{B}^{\top}\), transposing gives \(\mathbf{A}=\mathbf{B}\); hence the map is one-to-one as well as onto. \(\square\)

Worked Example: Transposing a Rectangular Matrix

Apply the transpose map to \(\mathbf{A}=\begin{bmatrix}1&-2&0\\3&4&5\end{bmatrix}\), then check that the output has a preimage and that transposing it again recovers the input.

The first row of \(\mathbf{A}\) becomes the first column, and the second row becomes the second column:

$$ \mathcal{T}(\mathbf{A})=\mathbf{A}^{\top} = \begin{bmatrix} 1&3\\ -2&4\\ 0&5 \end{bmatrix}. $$

This output is a \(3\times2\) matrix, as required by the codomain. Applying \(\mathcal{T}\) again returns a \(2\times3\) matrix:

$$ \mathcal{T}(\mathbf{A}^{\top}) = \begin{bmatrix} 1&-2&0\\ 3&4&5 \end{bmatrix} =\mathbf{A}. $$

Thus the calculation checks the inverse relationship directly. More generally, because every \(\mathbf{C}\in\mathbb{R}^{3\times2}\) is the transpose of \(\mathbf{C}^{\top}\), every \(3\times2\) output is attainable, and the input producing it is unique.

Point Evaluation on a Function Space

Let \(X\) be a set, and let \(F\) be a real vector space whose elements are functions \(f:X\to\mathbb{R}\). For a fixed point \(q\in X\), evaluation at \(q\) is the map \(\operatorname{ev}_q:F\to\mathbb{R}\) defined by \(\operatorname{ev}_q(f)=f(q)\). Its output is the value of the input function at one specified point.

Theorem: For any real vector space \(F\) of real-valued functions on \(X\) and any \(q\in X\), the point-evaluation map \(\operatorname{ev}_q:F\to\mathbb{R}\) is linear. Its kernel is the set of functions in \(F\) that vanish at \(q\), and its image is \(\{f(q):f\in F\}\). In particular, it is onto exactly when every real number occurs as \(f(q)\) for some \(f\in F\).

Proof. For \(f,g\in F\) and \(a,b\in\mathbb{R}\), the function-space operations are defined pointwise, so \((af+bg)(q)=af(q)+bg(q)\). Therefore \(\operatorname{ev}_q(af+bg)=a\operatorname{ev}_q(f)+b\operatorname{ev}_q(g)\), proving linearity. A function belongs to the kernel exactly when \(\operatorname{ev}_q(f)=0\), which means \(f(q)=0\). By the definition of image, its elements are exactly the values \(f(q)\) obtained as \(f\) ranges over \(F\). This image equals the codomain \(\mathbb{R}\) if and only if each real number is one of those values, which is precisely the stated condition for being onto. \(\square\)

The condition on the function space is essential. The formula \(f\mapsto f(q)\) by itself does not guarantee that every real output is attainable: the available functions may be restricted. For example, a space containing all constant functions can attain every real output at \(q\), since the constant function with value \(y\) evaluates to \(y\). A space that excludes constants may have a smaller image.

Worked Example: Two Point Values of a Quadratic

Let \(\mathbb{P}_2\) be the real vector space of polynomials of degree at most \(2\), including the zero polynomial. Define \(E:\mathbb{P}_2\to\mathbb{R}^2\) by \(E(p)=(p(0),p(1))\). Find its kernel, determine whether every pair of real outputs is attainable, and describe all polynomials attaining a given pair.

Write \(p(x)=a_0+a_1x+a_2x^2\). Evaluation gives \(E(p)=(a_0,a_0+a_1+a_2)\). The kernel condition is therefore \(a_0=0\) and \(a_0+a_1+a_2=0\). Substituting \(a_0=0\) into the second equation gives \(a_1+a_2=0\), or \(a_1=-a_2\). With \(c=a_2\), every kernel element has the form \(p(x)=c(x^2-x)\), where \(c\in\mathbb{R}\).

Now let the target pair be \((u,v)\in\mathbb{R}^2\). The first equation \(p(0)=u\) gives \(a_0=u\); the second equation \(p(1)=v\) gives \(u+a_1+a_2=v\). Taking \(a_2=c\) yields \(a_1=v-u-c\). Thus all preimages of \((u,v)\) are

$$ p(x)=u+(v-u)x+c(x^2-x), \qquad c\in\mathbb{R}. $$

Substitution checks the formula: \(p(0)=u\), while \(p(1)=u+(v-u)+c(1-1)=v\). Since this construction works for every \((u,v)\in\mathbb{R}^2\), the image of \(E\) is all of \(\mathbb{R}^2\). For a specific check, choose \((u,v)=(2,0)\) and \(c=1\). Then \(p(x)=2-3x+x^2\), and \(p(0)=2\), \(p(1)=2-3+1=0\). Its general fiber is \(2-2x+c(x^2-x)\), which differs from this choice by an element of the kernel.

Common Pitfall: Confusing the Formula with the Image

A tempting but incorrect claim is that every point-evaluation map is onto because one can choose a constant function with any desired value. That argument works only if those constant functions belong to the domain. For a concrete correction, take \(F=\{f:\mathbb{R}\to\mathbb{R}: f(x)=cx\text{ for some }c\in\mathbb{R}\}\), the one-dimensional space spanned by the function \(x\mapsto x\). Evaluation at \(0\) sends every \(f(x)=cx\) to \(f(0)=c\cdot0=0\). Hence \(\operatorname{im}(\operatorname{ev}_0)=\{0\}\), not \(\mathbb{R}\). The proposed constant function \(f(x)=1\) is not in this domain, so it cannot be used to produce the output \(1\). The correction is to determine attainable outputs from the actual functions in the stated domain.

For the three maps considered here, the image calculations use different features of their definitions. Trace attains every scalar because a diagonal entry can be chosen to match it. Transpose attains every matrix of the codomain because transposing a proposed output gives a preimage. Evaluation attains exactly the values available among the functions in its domain. In each case, the kernel explains which changes to an input leave the output unchanged.

Check Your Understanding

For each question, justify the conclusion using the definition of the map and, where relevant, substitute the proposed input back into the formula.

  1. Describe all matrices in \(\mathbb{R}^{2\times2}\) whose trace is \(-3\).
  2. What is the kernel and image of the transpose map from \(\mathbb{R}^{2\times3}\) to \(\mathbb{R}^{3\times2}\)?
  3. For \(F=\mathbb{P}_2\), determine the kernel of evaluation at \(0\), viewed as a map \(F\to\mathbb{R}\).
  4. Find a polynomial in \(\mathbb{P}_2\) that evaluates to \(4\) at \(0\) and \(-1\) at \(1\), and state the general form of all such polynomials.
  5. For the space \(F=\{f(x)=cx:c\in\mathbb{R}\}\), determine the image of evaluation at \(1\). Is that evaluation map onto \(\mathbb{R}\)?

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