Linear algebra related utilities.