Control theory uses 'signal-flow diagrams' to describe processes where real-valued functions of time are added, multiplied by scalars, differentiated and integrated, duplicated and deleted. These diagrams can be seen as string diagrams for the symmetric monoidal category FinVectk of finite-dimensional vector spaces over the field of rational functions k = R(s), where the variable s acts as differentiation and the monoidal structure is direct sum rather than the usual tensor product of vector spaces. For any field k we give a presentation of FinVectk in terms of the generators used in signal-flow diagrams. A broader class of signal-flow diagrams also includes `caps' and `cups' to model feedback. We show these diagrams can be seen as string diagrams for the symmetric monoidal category FinRelk, where objects are still finite-dimensional vector spaces but the morphisms are linear relations. We also give a presentation for FinRelk. The relations say, among other things, that the 1-dimensional vector space k has two special commutative dagger-Frobenius structures, such that the multiplication and unit of either one and the comultiplication and counit of the other fit together to form a bimonoid. This sort of structure, but with tensor product replacing direct sum, is familiar from the `ZX-calculus' obeyed by a finite-dimensional Hilbert space with two mutually unbiased bases.