matrix math exercise