Geometry and Matrix Factorisation for D-Branes