trigonometry and matrices