  The main purpose of this paper is to investigate the formal deficiency
indices ${\cal N}_{\pm}(I)$ of a symmetric first order system $$ Jf'+Bf=\lambda
{\cal H} f $$ on an interval $I$, where $I=\mathbb{R}$ or $I=\mathbb{R}_\pm.$
Here $J,B,{cal H}$ are $n\times n$ matrix valued functions and the Hamiltonian
${\cal H}\ge 0$ may be singular even everywhere. We obtain two results for such
a system to have minimal numbers ${\cal N}_\pm(\mathbb{R})=0$ (resp. ${\cal
N}_\pm(\mathbb{R}_\pm)=n$) and a criterion for their maximality ${\cal
N}_{\pm}(\mathbb{R}_+)=2n.$ Some conditions for a canonical system to have
intermediate numbers ${\cal N}_\pm(\mathbb{R}_+)$ are presented, too. We also
obtain a generalization of the well-known Titchmarsh-Sears theorem for second
order Sturm-Liouville type equations. This contains results due to Lidskii and
Krein as special cases.
  It is important to note that in general the above system does not give rise
to an operator but rather to a symmetric linear relation in a Hilbert space.
These relations are investigated in detail.
  As a byproduct we obtain very short proofs of (generalizations of) the main
results of a paper by Kogan and Rofe-Beketov (Proc. Roy. Soc. Edinb. 74
(1974/75))as well as a criterion for the quasi-regularity of canonical systems.
This covers the Kac-Krein theorem and some results from the quoted paper of
Kogan and Rofe-Beketov.
