Added power function to matrix.