The complete solution of the problem of finding invariants and canonical equations of quadrics (hypersurfaces of second order) in $n$-dimensional Euclidean space is given. The square matrix $A$ of the coefficients of second order terms of a quadric equation, and the rectangular matrix $D$ obtained from $A$ by adding of the column of the coefficients of first order terms, are considered. The ranks $r$ and $q$ of these matrices are invariants of a quadric; if $r=q$, then the quadric is central, if $r+1=q$ it is parabolic. An invariant $\Gamma_q$, which is a coefficient of a polynomial, is introduced. All the coefficients of the canonical equation of a quadric are expressed through eigenvalues of the matrix A and the invariant $\Gamma_q$. The problem is solved without "semi-invariants".