I/O operations with matrices and vectors