Working with vectors in three dimensions