a := vector([a1,a2]); b := s*vector([-a2,a1]); diag1 := a+b: diag2 := a-b: solve( angle(diag1,diag2) = Pi/2, s);