On similar matrices over the dual numbers