in reply to Merging two hashes, keeping keys unique but adding values if necessary
If you take your hashes to actually be matrixes to be added, then you can also think of some other solutions representing them instead as arrays of arrays. The only issue here is that this is not an efficient representation of the data if your matrixes end up being sparse.