Q:

How is this set of matrices a submanifold of the set of all symmetric $n \times n$ matrices?

Let $\mathcal{M}$ be the set all symmetric $n \times n$ real matrices. Let $\lambda$ be a real number and let $m$ be a nonnegative integer. How is the set $\mathcal{W}$ of all symmetric $n \times n$ real matrices with $\lambda$ as an eigenvalue of multiplicity $m$ a smooth submanifold of $\mathcal{M}$?
Also, why does $\mathcal{W}$ have codimension $m(m+1)/2$?

I'm having trouble finding a nondegenerate system of equations. Can I avoid that with the following approach?
Let $\mathcal W' = \{W - \lambda I\ : W \in \mathcal W\}$. Then the eigenvalues of each $W - \lambda I$ are the eigenvalues of $W$ shifted by $-\lambda$. So $0$ is an eigenvalue of multiplicity $m$ for each matrix in $\mathcal W'$, and it follows that each matrix in $\mathcal W'$ has rank $n - m$. 
The set of all $n \times n$ matrices with rank $n - m$ forms a smooth manifold (see Proposition 1.14 on page 133 of Optimization and Dynamical Systems by Helmke and Moore). 
Is there an easy way to show that $\mathcal W'$ is a submanifold of that manifold?

A:

As I've already mentioned, set of (symmetric) matrices of rank $k$ is not open. It's quite easy to construct counterexample: take a $n \times n$ diagonal matrix with exactly $k$ non-zero diagonal elements. If this set was open, then there would exist a small neighbourhood that consists of rank-$k$ matrices. But you can add arbitrary small perturbations to other diagonal elements of matrix and still change rank.
By $\chi_{M}$ let's denote the characteristic poly of matrix $M$, 
$$\chi_M(\lambda) = a_0 \lambda^n + a_1 \lambda^{n-1} + \dots + a_{n-1} \lambda + a_n .$$ 
It's well known that coefficients of characteristic poly are polynomial functions of matrix entries. For example, in case of $2 \times 2$ matrix characteristic equation can be written as 
$$(-1)^2 \lambda^2 + (-1)^1 \, {\rm tr}\, M \cdot \lambda^1 + (-1)^0 \det M \cdot \lambda^0 = 0.$$ 
Let's first consider the case when we're looking for conditions for $\lambda = 0$ being the root of multiplicity exactly $m$. Then the condition is simple: $a_{n-p} = 0$ for $0 < p < m$ and $a_{n-m} \neq 0$. If we remove the last condition then we'll have a set of matrices with root $\lambda = 0$ of multiplicity at least $m$. 
The general idea behind saying that this set is a submanifold is simple. The first part of conditions defines system of $m$ equations. If Jacobi matrix of this system has full rank in each point, then the set of points which satisfy system is a submanifold of dimension $n-m$. However, singularities (points, where Jacobi matrix doesn't have full rank) might occur in systems of equations. 
A quick example that illustrates the idea. Consider the set of symmetric $2 \times 2 $ matrices. Let's find how the set of matrices with simple root $\lambda = 0$ looks like.
You can write any symmetric $2 \times 2$ matrix as
$$ \left (
\begin{array}{cc}
x && y \\
y && z
\end{array} \right )$$
In order to have simple root $\lambda = 0$ this matrix must have $\det = 0$ and ${\rm tr} \neq 0$, i.e. $xz - y^2 = 0$ and $x + z \neq 0$. We have a "system" of 1 equation; in this case Jacobi matrix is just a gradient:
$$ \frac{Da_2}{D(x,y,z)} = 
\left (
\begin{array}{c}
z \\
-2y \\
x
\end{array}
\right ) $$
Note that this matrix has full rank iff any of its entry is non-zero. So, the only point of $f(x,y,z) = xz - y^2$ where Jacobi matrix doesn't have full rank is the point $(0,0,0)$. That's where the singularity occurs. If you visualize this set in $3D$ (for example, here ), you will see that this surface is a cone and that point $(0,0,0)$ is an apex of this cone. So, strictly speaking, set $xz - y^2$ is not a submanifold of $\mathbb{R}^3$ —  the point $(0,0,0)$ messes everything up, it has no neighbourhood that is homeomorphic to disk in $\mathbb{R}^2$. It's time to use second condition, $x + z \neq 0$ : it removes the singularity and now we have a true submanifold of $\mathbb{R}^3$. However, now it consists of two disjoint parts.
I hope that this will make things clear. The main idea is a fact that non-degenerate system of equations (i.e., which has full-rank Jacobian in each point) defines a submanifold. The last condition $a_{n-m} \neq 0$ might be crucial for removing singularities in this problem (I haven't proven rigorously that it's so, but I think it might be true - I'll be glad if someone will point me to the counterexample).

