# Steinitz exchange lemma

The Steinitz exchange lemma is a basic theorem in linear algebra used, for example, to show that any two bases for a finite-dimensional vector space have the same number of elements. The result is named after the German mathematician Ernst Steinitz. The result is often called the Steinitz–Mac Lane exchange lemma, also recognizing the generalization[1] by Saunders Mac Lane of Steinitz's lemma to matroids.[2]

## Statement

If {v1, ..., vm} is a set of m linearly independent vectors in a vector space V, and {w1, ..., wn} span V, then:

1. m ≤ n;

2. possibly after reordering the wi, the set {v1, ..., vm, wm + 1, ..., wn} spans V.

## Proof

Let P(m) denote the following proposition: for each k in {0, …, m}.

${\displaystyle k\leq n}$ and the set ${\displaystyle \{v_{1},\dotsc ,v_{k},w_{k+1},\dotsc ,w_{n}\}}$ spans V (where the wj have possibly been reordered, and the reordering depends on k).

We prove by mathematical induction that for any nonnegative integer m, the proposition P(m) is true, thereby proving the lemma.

For the base case, suppose k is zero. In this case, P(k) is true because there are no vectors vi, and the set ${\displaystyle \{w_{1},\dotsc ,w_{n}\}}$ spans V by hypothesis.

For the inductive step, assume the proposition is true for some arbitrary k less than m. Since ${\displaystyle v_{k+1}\in V}$, and ${\displaystyle \{v_{1},\ldots ,v_{k},w_{k+1},\ldots ,w_{n}\}}$ spans V (by the induction hypothesis), there exist ${\displaystyle \mu _{1},\ldots ,\mu _{n}}$ such that

${\displaystyle v_{k+1}=\sum _{j=1}^{k}\mu _{j}v_{j}+\sum _{j=k+1}^{n}\mu _{j}w_{j}}$.

At least one of ${\displaystyle \{\mu _{k+1},\ldots ,\mu _{n}\}}$ must be non-zero, otherwise this equality would contradict the linear independence of ${\displaystyle \{v_{1},\ldots ,v_{m}\}}$; note that this additionally implies that ${\displaystyle k+1\leq n}$. By reordering the ${\displaystyle \mu _{k+1}w_{k+1},\ldots ,\mu _{n}w_{n}}$, we may assume that ${\displaystyle \mu _{k+1}}$ is not zero. Therefore, we have

${\displaystyle w_{k+1}={\frac {1}{\mu _{k+1}}}\left(v_{k+1}-\sum _{j=1}^{k}\mu _{j}v_{j}-\sum _{j=k+2}^{n}\mu _{j}w_{j}\right)}$.

In other words, ${\displaystyle w_{k+1}}$ is in the span of ${\displaystyle \{v_{1},\ldots ,v_{k+1},w_{k+2},\ldots ,w_{n}\}}$. The latter span therefore contains each of the vectors ${\displaystyle v_{1},\ldots ,v_{k},w_{k+1},w_{k+2},\ldots ,w_{n}}$, and hence must contain the span of these latter vectors as a subset. But since the latter span is V (by the induction hypothesis), this simply means that the span of ${\displaystyle \{v_{1},\ldots ,v_{k+1},w_{k+2},\ldots ,w_{n}\}}$ contains V as a subset (thus is V). We have thus shown that P(k + 1) is true, completing the inductive step.

## Applications

The Steinitz exchange lemma is a basic result in computational mathematics, especially in linear algebra and in combinatorial algorithms.[3]

## References

1. ^ Mac Lane, Saunders (1936), "Some interpretations of abstract linear dependence in terms of projective geometry", American Journal of Mathematics, The Johns Hopkins University Press, 58 (1): 236–240, doi:10.2307/2371070, JSTOR 2371070.
2. ^ Kung, Joseph P. S., ed. (1986), A Source Book in Matroid Theory, Boston: Birkhäuser, ISBN 0-8176-3173-9, MR 0890330.
3. ^ Page v in Stiefel: Stiefel, Eduard L. (1963). An introduction to numerical mathematics (Translated by Werner C. Rheinboldt & Cornelie J. Rheinboldt from the second German ed.). New York: Academic Press. pp. x+286. MR 0181077.