Standard matrix operations in Java