This task is similar to:

   Matrix multiplication
   Matrix transposition


Task

Implement basic element-wise matrix-matrix and scalar-matrix operations, which can be referred to in other, higher-order tasks.

Implement:

   addition
   subtraction
   multiplication
   division
   exponentiation


Extend the task if necessary to include additional basic operations, which should not require their own specialised task.




#lang racket(require math/array)
 
(define mat (list->array #(2 2) '(1 3 2 4)))
 
mat
(array+ mat (array 2))
(array* mat (array 2))
(array-map expt mat (array 2))
 
(array+ mat mat)
(array* mat mat)
(array-map expt mat mat)
 