General tips for showing that subspaces "vary continuously" Here is (part of) a problem from Spivak's Differential Geometry Vol. 1.

6. For a bundle map $(\tilde f,f),$ with $f:B_1\to B_2,$ let $K_p$ be the kernal of the map $\tilde f|_{\pi_1^{-1}(p)}$ from $\pi_1^{-1}(p)$ to $\pi_1^{-1}(f(p))$.
a.) If $p\mapsto \dim K_p$ is continuous, then $\ker\tilde f,$ the union of all the $K_p,$ is a bundle over $B_1.$

The solution to this problem, along with the part after it, seems to rely on the fact that the subspaces $K_p$ "vary continuously" with the variable $p.$ I'm not exactly sure how one would even go about showing this, or if that's what I should be trying to do at all (perhaps that will be an artifact of a correct solution). It seems like what I want should follow from the continuity of $f,$ but I am still unsure how to proceed.
So, my questions are how does one go about showing that the spaces $K_p$ vary in a nice way? Is there a general strategy for showing this type of thing, or do solutions vary?
 A: As explained in Hunter's comments and answer, since being a bundle is a local property, it suffices to prove the following.
Claim: Let $U\subset\mathbb{R}^n$ be open and connected, and let $f:U\to M_{q\times p}(\mathbb{R})$ be continuous (or smooth, or $C^k$ for some $k$) such that the rank of $f(x)$ is constant. Then the set $\{(x,v)|x\in U,\;v\in\ker f(x)\}\subset U\times\mathbb{R}^p$ is a vector bundle over $U$.
To prove the claim, suppose first that $p\geq q$, and that the matrix $f(x)$ is of degree $q$ for every $x$. Let $x\in U$, and without loss of generality, suppose that the $q$ rightmost columns of $f(x)$ are linearly independent. Then there is a neighborhood $x\in V\subset U$ such that for every $y\in V$ the $q$ rightmost columns of $f(y)$ are linearly independent. Let us write $$f(y)=:(A(y)\;B(y)),$$where $A:V\to M_{q\times (p-q)}(\mathbb{R})$ and $B:V\to M_{q\times q}(\mathbb{R})$ are continuous (or differentiable), and $B(y)$ is everywhere invertible. Then the kernel of $f(y)$ is given by $$\begin{align}\ker f(y)&=\left\{\left.\left(\begin{array}{c}w\\z\end{array}\right)\right|w\in\mathbb{R}^{p-q},z\in\mathbb{R}^q,A(y)w+B(y)z=0\right\}\\
&=\left\{\left.\left(\begin{array}{c}w\\z\end{array}\right)\right|w\in\mathbb{R}^{p-q},z\in\mathbb{R}^q,z=-B(y)^{-1}A(y)w\right\}.\end{align}$$Hence, the set $$\{(y,v)|y\in V,v\in\ker f(y)\}$$is homeomorphic (diffeomorphic) to $V\times\mathbb{R}^{p-q}$ by $$(y,a)\mapsto\left(y,\left(\begin{array}{c}a\\-B(y)^{-1}A(y)a\end{array}\right)\right).$$The case $\mathrm{rank}(f)=q$ is thus proved.
We proceed to the general case $\mathrm{rank}(f)=r\leq q$. Let $x\in U$, and without loss of generality, suppose the upper rightmost $q\times q$ submatrix of $f(x)$ is invertible. Once again, this continues to hold on a neighborhood $x\in V\subset U$. As the rank is constant on $V$, for every $y\in V$ and $v\in\mathbb{R}^p$ we have $v\in\ker f(y)$ if and only if the first $r$ coordinates of $f(y)v$ vanish. This means that, in $V$, we may ignore the bottom $q-r$ rows of $f$, and this case follows from the previous one.
A: Fleshing out the comments from earlier.
We might as well assume the base is connected, in which case the dimension of the kernel has to be constant (continuous map from connected to discrete space). Moreover, we might as well assume the base is $\mathbb{R}^n$ and the bundles are trivial over the base, since a collection of vector spaces over a base will be a vector bundle iff it is a vector bundle locally. So the morphism of bundles is just a $p$ by $q$ matrix, varying smoothly over the points.
Now say that you have a smooth function $\phi: \mathbb{R}^n \to M_{p \times q}(\mathbb{R})$ such that the dimension of the kernel of the image of a point is constant. The claim is that $x \mapsto \ker \phi(x)$ is a vector bundle over $\mathbb{R}^n$. Again we can prove that it's a bundle over a bunch of open subsets that cover $\mathbb{R}^n$.
We may think of $\phi$ as a matrix of smooth functions $\phi_{ij}$. Elementary row operations don't change the kernel of $\phi(x)$, so we are free to manipulate the matrix by elementary row operations. Elementary column operations do change the kernel, but don't change the isomorphism class of the bundle $x \mapsto \ker \phi(x)$ (because an invertible p by p matrix $\psi$ gives an isomorphism from $\ker \phi \circ \psi$ to $\ker \phi$.)
The kernel bundle is trivial over an open set if the matrix of functions is constant on that set.
We are going to induct on the product $pq$ of the dimensions of the matrix. If the matrix is one by one then it is either identically zero or nowhere zero by the assumption on the rank, and the result is clear in either case.
Let $U_{ij}$ be the subset of $\mathbb{R}^n$ where $\phi_{ij}$ doesn't vanish. We can assume that the $U_{ij}$ cover $\mathbb{R}^n$ since otherwise $\phi$ is the zero matrix identically at some point, hence at every point by our assumption on the dimension of the kernel, and in that case the claim is obvious. So it suffices to prove the result over the $U_{ij}$.
Now on $U_{ij}$, we can divide row $i$ by $\phi_{ij}$, and use it to eliminate the remainder of column $j$ and row $i$, then move it into position $(1, 1)$. Our bundle is thus isomorphic to the kernel of a bundle of the form
$$
\begin{pmatrix}
1 & 0 & \ldots & 0\\
0 & \widetilde{\phi}_{22} & \ldots & \widetilde{\phi}_{2q} \\
\vdots & \ddots & \ldots & \vdots \\
0 & \widetilde{\phi}_{p2} & \ldots & \widetilde{\phi}_{pq}
\end{pmatrix}.
$$
which itself is isomorphic to the kernel bundle for the lower-right submatrix, and so we get the result by induction.
