Let $P(x,z)= z^d +\sum_{i=1}^{d}a_i(x)z^{d-i}$ be a polynomial, where $a_i$ are real-analytic functions in an open subset $U$ of $\mathbb{R}^n$ . If, for any $x \in U$ , the polynomial $z\mapsto P(x,z)$ has only real roots, then we can write those roots as locally Lipschitz functions of $x$ . Moreover, there exists a modification (a locally finite composition of blowups with smooth centers) $\sigma : W \to U$ such that the roots of the corresponding polynomial $\tilde P(w,z) =P(\sigma (w),z),w\in W $ , can be written locally as analytic functions of $w$ . Let $A(x), x\in U$ , be an analytic family of symmetric matrices, where $U$ is open in $\mathbb{R}^n$ . Then there exists a modification $\sigma : W \to U$ such that the corresponding family $\tilde A(w) =A(\sigma(w))$ can be locally diagonalized analytically (i.e., we can choose locally a basis of eigenvectors in an analytic way). This generalizes Rellich's well-known theorem (see [32]) from 1937 for $1$ -parameter families. Similarly, for an analytic family $A(x), x\in U$ , of antisymmetric matrices, there exists a modification $\sigma$ such that we can find locally a basis of proper subspaces in an analytic way