Typescript Sum All Elements In Matrix