How does one multiply a list of matrices by a list of vectors, elementwise? For example, multiplying
A = {IdentityMatrix[2], 2*IdentityMatrix[2]}
x = {{1, 1}, {2, -2}}
should return
{{1, 1}, {4, -4}}
Neither Dot nor Times accomplishes this; both have the wrong dimensions. A cumbersome way would be
result = {{0, 0}, {0, 0}}
Do[result[[i]] = A[[i]].x[[i]], {i, 2}]
but surely there is a cleaner way.
