> with(LinearAlgebra): > # enter a matrix row-wise > M := Matrix([[1,0,1],[1,1,0],[0,0,1]]); [1 0 1] [ ] M := [1 1 0] [ ] [0 0 1] > # a 3 by 3 identity matrix > I3 := Matrix(3,3,shape='identity'); [1 0 0] [ ] I3 := [0 1 0] [ ] [0 0 1] > # compute the sum > Msum := I3 + M; [2 0 1] [ ] Msum := [1 2 0] [ ] [0 0 2] > # compute the third power of the Msum > Msum^3; [ 8 0 12] [ ] [12 8 6] [ ] [ 0 0 8]