Transform vectors using matrices