Skip to Content

Calculate the sum of matrices in a list or a 3D array

Given a list (length = n) of 2x2 matrices, how do I calculate the sum of all those matrices (and get a 2x2 matrix) ?

How can I do it, if instead of a list I have those matrices in a (2 x 2 x n) dimensional array ?