Let be a symmetric matrix. We prove the claim by induction. For , the statement is trivially true.
Let $\left(\lambda_1, x_1\right), \left(\lambda_2, x_2\right) \dots \dots \left(\lambda_k, x_k\right)$ with $x_i$’s being independent. Thus we have,
\begin{align}
A \left[x_1| x_2| \dots |x_k\right] &= \left[Ax_1|Ax_2|\dots|Ax_k\right] \\
&= \left[ \lambda_1 x_1|\lambda_2 x_2|\dots|\lambda_k x_k \right ] \\
&= \left[x_1|x_2| \dots |x_k\right] \begin{bmatrix}
\lambda_1 & & \\
&\lambda_2& \\
& & \ddots \\
& & & \lambda_k
\end{bmatrix}
\end{align}
Since $A$ is symmetric, we can take $x_i$'s to be orthonormal. Let $ \left \{y_1, y_2 \dots y_{n-k} \right\}$ be a set of orthonormal vectors such that $\left\{ x_1, x_2 \dots x_k ,y_1, y_2, \dots y_{n-k}\right \}$ form a orthonormal basis for $\mathbb{R}^n$
Let $P_1 = \begin{bmatrix} x_1 &x_2 &\dots &x_k \end{bmatrix} \in \mathbb{R}^{n \times k}$, $P_2 = \begin{bmatrix} y_1 &y_2 &\dots &y_{n-k} \end{bmatrix} \in \mathbb{R}^{n \times (n-k)}$ and $D_1 = \begin{bmatrix}
\lambda_1 & & \\
&\lambda_2& \\
& & \ddots \\
& & & \lambda_k
\end{bmatrix} $.
Thus,
\begin{align}
P &= \begin{bmatrix} P_1 &P_2 \end{bmatrix} \\
&= \begin{bmatrix}x_1 &x_2 &\dots &x_k &y_1 &y_2 &\dots &y_{n-k} \end{bmatrix} \\
AP &= \begin{bmatrix} \lambda_1 x_1 &\lambda_2x_2 &\dots &\lambda_k x_k &Ay_1 &Ay_2 &\dots &Ay_{n-k} \end{bmatrix} \\
&=\begin{bmatrix} P_1 D_1 &AP_2 \end{bmatrix} \\
P^T AP &= \begin{bmatrix} P_1 ^T \\ P_2^T \end{bmatrix} \begin{bmatrix} P_1 D_1 &AP_2 \end{bmatrix} \\
&= \begin{bmatrix} P_1 ^T P_1 D_1 &P_1^T A P_2 \\ P_2^T P_1 D_1 &P_2^TAP_2 \end{bmatrix} \\
&= \begin{bmatrix} D_1 &0 \\ 0 &P_2^TAP_2 \end{bmatrix}
\end{align}
Since, $A$ is symmetric, $P^T_2 A P_2$ is also symmetric matrix, but of dimension $(n-k) \times (n-k)$. Using induction hypothesis, $\exists \: Q$ such that,
$$Q^T P^T_2 A P_2 Q = D_2,$$
where $D_2$ is a diagonal matrix of dimension $(n-k) \times (n-k)$.
Let $S =\begin{bmatrix} P_1 &P_2Q \end{bmatrix} $.
Consider,
\begin{align}
S^T A S &= \begin{bmatrix} P_1 ^T \\ Q^T P_2^T \end{bmatrix} A \begin{bmatrix} P_1 &P_2Q\end{bmatrix}\\
&= \begin{bmatrix} P_1 ^T AP_1 &P_1^T A P_2 \\ Q^T P_2^T A P_1 &Q^T P_2^TAP_2 Q \end{bmatrix} \\
&= \begin{bmatrix} P_1 ^T P_1D_1 &P_1^T A P_2 \\ Q^T P_2^T P_1 D_1 &D_2 \end{bmatrix} \\
&= \begin{bmatrix} D_1 &0 \\ 0 &D_2 \end{bmatrix}
\end{align}
Hence, $A$ is diagonalisable.