TITLE: Is the category of vector bundles over a topological space abelian?
QUESTION [29 upvotes]: Consider the trivial bundle $V=\mathbb{R}\times\mathbb{R}$ and the map $f:V\rightarrow V$ given by $(t,x)\mapsto(t,tx)$. This has fibrewise kernels and cokernels, but the ranks jump at 0, so the kernel and cokernel of $f$ (as sheaves) are not vector bundles. This example (or similar) is often given to show that Vect($X$) is not in general abelian (or even preabelian).
But this doesn't strike me as correct. Just because $f$ has a kernel (say) $K$ in Sh($X$) which is not an object of Vect($X$) does not mean that there is not an object of Vect($X$) which is a kernel for $f$ in Vect($X$). In the example above, the zero bundle seems to do the job? Indeed I think you can always fix this rank-jumping behaviour by extending smoothly over the bad points (or am I wrong?).
The situation is further confused by Serge Lang claiming (in Algebra, p 134)
"the category of vector bundles over a topological space is an abelian category."
As a counter-appeal to authority Ravi Vakil has (Foundations of AG notes)
"locally free sheaves (i.e. vector bundles), along with reasonably natural
maps between them (those that arise as maps of $\mathcal{O}_X$-modules), don’t form an abelian
category."
So is the category of vector bundles over a topological space abelian or not?

REPLY [12 votes]: Here is an argument to show that this category doesn't have kernels.  Let's take $X$ to be the interval $[-1,1]$, and consider the self-map of the trivial bundle $X \times \mathbb{R}$ given by
$$
(x,t) \mapsto (x, (x + |x|)t).
$$
Suppose this had a kernel $K$, fitting into a sequence $K \to X \times \mathbb{R} \to X \times \mathbb{R}$.  We get a sequence of modules of global sections
$$
\Gamma(K) \to C(X) \stackrel{x + |x|}{\longrightarrow} C(X)
$$
over the ring $C(X)$ of continuous functions on $X$.  (The Serre-Swan theorem has been mentioned already; this is equivalent data.)
However, the global section functor is another name for $Hom(X \times \mathbb{R}, -)$ in the category of vector bundles, and so the "kernel" property implies that the module $\Gamma(K)$ would actually be the kernel of multiplication by $x + |x|$.
This is impossible.  Every element in $\Gamma(K)$ is annihilated by $x + |x|$ by definition, and $\Gamma(K)$ is nonempty, but every nonzero vector bundle on $X$ is some power of the trivial bundle (by the homotopy invariance property) and has many sections which do not vanish on $(0,1]$.