# Every subspace of $\mathbb{R}^m$ is the range of some linear function

We have the following statement (Matrix analysis and applied linear algebra, Mayer)

The range of every linear function $$f:\mathbb{R}^n\rightarrow\mathbb{R}^m$$ is a subspace of $$\mathbb{R}^m$$, and every subspace of $$\mathbb{R}^m$$ is the range of some linear function.

I understand the proof of the first part, but I need to understand the argument in the second part of statement.

He starts as follows.

Let $$V$$ be a subspace of $$\mathbb{R}^m$$. Suppose that $$\{v_1, v_2, \dots, v_n\}$$ is spanning set for $$V$$ so that $$V = \{\alpha_1v_1+ \dots + \alpha_nv_n \mid \alpha_i \in \mathbb{R}\}.$$

I know that every vector space has spanning set. Clearly, if the spanning set of $$V$$ has $$k$$ vectors, then there is also a spanning set of $$V$$ which has $$k+1$$ vector.

But I do not know why he is sure that the spanning set of $$V$$ has $$n$$ vectors. What am I missing? Thank you.

• I think your confusion comes from the fact that the $n$ in $f\colon \Bbb R^n \to \Bbb R^m$ can be different form the $n$ of $\{v_1,\ldots,v_n\}$. – Surb Mar 27 '20 at 19:24
• More precisely, for every $f\colon \Bbb R^n \to \Bbb R^m$, $f(\Bbb R^n)$ is always a subset of $\Bbb R^m$. Now, for every subspace $V$ of $\Bbb R^m$, there exists a $k$ and $\{v_1,\ldots,v_k\}\subset \Bbb R^m$ which spans $V$. However, $k$ and $n$ are not related in general. – Surb Mar 27 '20 at 19:26
• @Surb Thank you. As noted below, the $n$ in the first part of the theorem is different from the $n$ used in the proof of the second part of the theorem. – Kapur Mar 27 '20 at 19:31

## 1 Answer

The statement is not very clear in this way. There are two true things.

1. The range of any linear function $$f : \mathbb{R}^n \to \mathbb{R}^m$$ is a subspace of $$\mathbb{R}^m$$.
2. Any subspace of $$\mathbb{R}^m$$ is the range of some linear function.

The second statement does not specify the domain of the function, and, for reasons of dimension, it has to be $$\mathbb{R}^n$$ with $$n \geq m$$. A better statement would be the following

For any $$n \geq m$$ and any subspace $$V$$ of $$\mathbb{R}^m$$, there is a linear function $$f : \mathbb{R}^n \to \mathbb{R}^m$$ such that $$V$$ is the range of $$f$$.

Then the proof is essentially as you say: take a spanning set $$\{ v_1, \cdots, v_m \}$$ of $$V$$, and define $$f(e_i) = v_i, \quad i = 1, 2, \dots, m,$$ and $$f(e_i) = v_m, \quad i = m+1, \dots, n.$$

• Thank you for clarification. I understand now. – Kapur Mar 27 '20 at 19:33