The differentiability of the metric projection
P
P
onto a closed convex set
K
K
in
\mathbf{R}^n
R
n
is examined. The boundary
\partial K
∂
K
can have singular points of orders
k=-1,0,1\ldots,n-1
k
=
−
1
,
0
,
1
…
,
n
−
1
. Here
k=-1
k
=
−
1
corresponds to the interior points of
K
K
,
k=0
k
=
0
to regular points of the boundary (i.e., faces),
k=1,\ldots,n-2
k
=
1
,
…
,
n
−
2
to edges and
k=n-1
k
=
n
−
1
to vertices. It is assumed that for every
k
k
the set of all singular points forms an
n-k-1
n
−
k
−
1
dimensional manifold
T_{k+1}
T
k
+
1
(possibly empty) of class
p\geq 2
p
≥
2
. Under a mild continuity assumption it is shown that then
P
P
is of class
p-1
p
−
1
on an open set
W
W
whose complement has null Lebesgue measure. The set
W
W
is the union of the interiors of inverse images of
T_{k+1}
T
k
+
1
under
P
P
. Moreover, a formula for the Fréchet derivative D
P
P
on each of these regions is given that relates D
P
P
to the second fundamental form (i.e., the curvature) of the manifold
T_{k+1}
T
k
+
1
. The results are illustrated (a) on the metric projection
P
P
from the space Sym of symmetric matrices onto the convex cone Sym
^+
+
of positive semidefinite symmetric matrices and (b) on the metric projection from Sym onto the unit ball under the operator norm. We prove the indefinite differentiability of these projections on explicitly determined open sets with complements of measure
0
0
and give explicit formulas for the derivatives. In (a) the method of proof, based on the above general result, is different from the previous treatment of J. Malick and H. S. Sendov [Clarke Generalized Jacobian of the Projection onto the Cone of Positive Semidefinite Matrices, Set-Valued Analysis 14, (2006) 273–293] and applies to situations as described by C. Padovani and M. Šilhavý [On the derivative of the stress-strain relation in a no-tension material (2015), in preparation] where the special methods of Malick and Sendov cited above cannot be used. The case (b) is new.