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.




   scalar: 10
   vector: 2 3 5
   matrix: 3 3 # 7 11 13  17 19 23  29 31 37
 
   scalar * scalar
100
   scalar * vector
20 30 50
   scalar * matrix
(70 110 130
 170 190 230
 290 310 370)
 
   vector * vector
4 9 25
   vector * matrix
(14 22 26
 51 57 69
 145 155 185)
 
   matrix * matrix
(49 121 169
 289 361 529
 841 961 1369)
 