\[A,B\]
  on a closed curve  \[C\]
.
\[\int_C \mathbf{F} \cdot d \mathbf{r}= \int_{\gamma_1} \mathbf{F} d \mathbf{r} + \int_{\gamma_2} \mathbf{F} d \mathbf{r}\]
where
\[\gamma_1 \]
  is the part of the curve  \[C\]
  from  \[A\]
  to  \[B\]
  shown above and  \[\gamma_2 \]
  is the part of the curve  \[C\]
  from  \[B \]
  to  \[A \]
  nabove.Since the integral of
\[\mathbf{F} \]
  around any closed curve is zero,  \[0=\int_C \mathbf{F} \cdot d \mathbf{r}= \int_{\gamma_1} \mathbf{F} \cdot d \mathbf{r} + \int_{\gamma_2} \mathbf{F} \cdot d \mathbf{r} \rightarrow  \int_{\gamma_1} \mathbf{F} \cdot d \mathbf{r} =- \int_{\gamma_2} \mathbf{F} \cdot d \mathbf{r} \rightarrow  \int_{\gamma_1} \mathbf{F} \cdot d \mathbf{r} = \int_{- \gamma_2} \mathbf{F} \cdot d \mathbf{r}\]
Notice that
\[\gamma_1 , - \gamma_2\]
  are any paths from A to B, so the the integral is independent of the paths.