; A := matrix(2,2,[a,b,0,c]); A2 := evalm(A^2); A3 := evalm(A^3); Eq1 := a^3 = 1; Eq2 := c^3 = -8; Eq3 := b*(a^2+a*c+c^2) = 30; a := 1: c := -2: Eq3; matrix(2,2,[1,10,0,-2])^3; evalm(%);