Prove the orthogonality condition

I know that for:

is shown by:

The last step follows by the standard rules for partial differentiation, assuming that is a function of , , , and so on. The final result, is equal to , since and as coordinate lines ( ) are assumed to be perpendicular or orthogonal. Equivalently, we may assume that and ( ) are totally independent variables. If , the partial derivative is clearly equal to 1.

But, I have no idea how to prove it with the and switched.

By the way:

for

for .