Prove that $A = A^T$ has a repeated eigenvalue iff $AJ = JA$ for a nonzero skew-symmetric matrix $J^T = -J \ne 0$ 
Prove that $A = A^T$ has a repeated eigenvalue iff it commutes, $AJ =
JA$, with a nonzero skew-symmetric matrix: $J^T = -J \ne O$. 
Solution: 
If $\delta = diag(\lambda_1,...,\lambda_n)$, then the
  $(i,j)$ entry of $\delta M$ is $d_im_{ij}$, whereas the $(i,j)$ entry
  of $M\delta $ is $d_km_{ik}$. These are equal iff either $m_{ik} =0$
  or $d_i = d_k$. Thus, $\delta M = M\delta$ with $M$ having one or more
  non-zero off-diagonal entries, which includes the case of non-zero
  skew-symmetric matrices, iff $\delta$ has one or more repeated
  diagonal entries. Next, suppose $A = Q\delta Q^T$ is symmetric with
  diagonal form $\delta$. If $AJ = JA$, then $\delta M = M\delta$ where
  $M = Q^TJQ$ is also nonzero, skew-symmetric, and hence $A$ has
  repeated eigenvalues.

I have a lot of questions regarding the proof given above. 


*

*What is $M$ in this proof? 

*The first sentence where it describes the entries how where they able to obtain $d_im_{ij}$ and $d_km_{ik}$? I understand how they got $d_im_{ij}$, but how did they get $d_km_{ik}$ -- isn't it suppose to be $m_{ik}d_k$?

*Why is it equal iff $m_{ik} = 0$ or $d_i = d_k$?

*The third sentence, why does it give non-zero off-diagonal entries iff $\delta$ has one or more repeated roots?
 A: The problem is a bit confusing in why it choose to use skew-symmetric matrices. The claim in-fact holds for all non-symmetric matrices. I will write out the general proof while answering the questions you had.
Proposition: Let $A$ be a symmetric matrix. Then $A$ has a repeated eigenvalue if and only if there exists a non-symmetric matrix $J$ which commutes with $A$.
Proof: We begin with a generic matrix $M$. $M$ is any matrix, it doesn't matter which one.
A given diagonal matrix $D$ will commute with $M$ if and only if $$d_im_{ij} = d_jm_{ij}$$ This is a simple consequence of matrix multiplication as explained in your proof. Remember that the entries of the matrix are just numbers. Ordinary real numbers commute, so you have $d_jm_{ij} = m_{ij}d_j$, there is no problem there. 
Continuing, if we have $d_im_{ij} = d_jm_{ij}$ then we must have $m_{ij}(d_i - d_j) = 0$. One of the two factors must be zero for this to happen, so either $m_{ij} = 0$ or $d_i = d_j$.
The third sentence in your proof is wrong. What we have established so far is that if $m_{ij} \neq 0$, then $M$ can commute with $D$ only if $d_i = d_j$. This is not and if an only if. 
If $M$ commutes with $D$ and if $M$ has non-zero off diagonal entries then we must have repeated diagonal entries on $D$. In general, the more non-zero off diagonal entries that $M$ has, the more diagonal entries needs to be repeated for $D$. If $m_{ij}$ is non-zero for all off diagonal entries then we must have $d_i = d_j$ for all $i\neq j$ where then the matrix $D$ is just a scalar multiple of the identity. Clearly then having some random subset of diagonal entries repeated is not enough to guarentee that $D$ and $M$ commute; it needs to be a rather specific. 
What is true however, is that there will always exist a $M$ with non-zero off-diagonal entries which commutes with $D$ when $D$ has repeated entries. If $d_i = d_j$ then simply take $m_{ij}$ and $m_{ji}$ to be whatever non-zero numbers you want and make the rest of the off-diagonal entries zero.
So far our claim is: There exists a matrix $M$ with non-zero off-diagonal entries that commute with $D$ if and only if $D$ has repeated entries.
To continue on with our proof, take some symmetric matrix $A$. Orthogonally diagonalize $A$ as
$$A = QDQ^\mathrm{T}$$
Suppose then that some non-symmetric matrix $J$ commutes with $A$. Then take
$$M = Q^\mathrm{T}JQ$$
We know that $M$ is asymmetric which necessarily means that there exists non-zero off-diagonal entries. $M$ and $D$ commute, so $D$ must have repeated eigenvalues.
Conversely, suppose that $D$ has repeated eigenvalues. From our previous discussion, we can construct a matrix $M$ which commutes with $D$. More precisely, we are free to choose $M$ to be non-symmetric. Then $J=QMQ^\mathrm{T}$ is a non-symmetric matrix which commutes with $A$.
