# path independence of a scalar field line integral

I had seen mathematical proofs of why it's true. But I couldn't wrap around my head with the intuition behind it.

For a single variable function, $$$$\int_{a}^{b}f(x) \,dx = -\int_{b}^{a}f(x) \,dx$$$$

but why is this not the case with line integral? $$\int_D f(x,y) \,ds = \int_{-D} f(x,y) \,ds$$

why is it equal?