# The shortest distance between skew lines

- Author:
- Mark Willis

**1.**Click for point A and B on L1 and L2;

**2.**Click for the directional vectors v1 and v2 of L1 and L2;

**3.**Click for vector joining L1 and L2 i.e. vector a = vector AB;

**4.**Click for vector b the vector product of v1 and v2;

**5.**Click for shortest distance between the skew lines L1 and L2 this is achieved by calculating the scalar projection of vector a onto vector b;

**6.**Move the slider to move point B on L2, notice that the projection does not change;

**7.**Use Rotate 3D Graphics View" to see from different perspectives;

**8.**For full 3D effect: Right click select Graphics - 3D Graphics - Projection - Glasses. Move the view to the right using your mouse and then put on your red-cyan 3D glasses and enjoy.