I have a list containing 500 rows, each of 37 elements; i.e., a 500 x 37 matrix.
My goal is to substract in each row each element from the first. My approach in mind is to call each list by a PureFunction and then to subtract the second element from the first, then the third from the first so in the end I would have a list with 500 sublists, each with 36 elements. I failed to figure out how to call single elements if, as in my case, the the list is called by a PureFunction. I also tried to work with slots, again failing to call the single elements of the already called list. I highly appreciat any help or comments!


SparseArrayobject (basically instantaneous) and then does 1Dotproduct of two matrices. Matrix multiplication is probably one of the most highly optimized algorithms in the numerical analysis literature, and even more highly optimized would be matrix multiplication with a sparse array. So, I'm not surprised my solution is fast. It is a bit surprising that it is faster than a single subtraction of a matrix from a vector. Probably there is some overhead in threading the vector/matrix subtraction. – Carl Woll Jun 06 '17 at 01:35