Matrix analysis with applications