Grammar-Compressed Linear Algebra