<<VilGebra`

A={{2,-1},{-1,2}};
DiagonalizacionOrtogonal[A]