orientation preserving map Let $f:X\rightarrow Y$ be a diffeomorphism between connected oriented manifolds. $f$ is orientation-preserving at $p\in X$ if the induced map $df_{p}:T_{p}X\rightarrow T_{f(p)}Y$ is orientation-preserving; similarly $f$ is orientation-reversing at $p$ if the derivative is orientation-reversing. Why must $f$ be either orientation-preserving everywhere or orientation-reversing everywhere?
I think it is true that the sets of points where $p$ is orientation-preserving and orientation-reversing are both open (which implies the result), but I can't prove this.
 A: Let $l$ and $m$ be two orientation on $M$. At any point $p\in M$, $l_p$ and $m_p$ are orientation of $T_p(M)$. They are either same or opposite orientations. Define a function $f:M\rightarrow\{1,-1\}$ by $$f(p)=1 \text{if } l_p=m_p$$ and $$f(p)=-1 \text{if } l_p=-m_p$$ Now fix a point $p\in M$. By continuity there exist a connected neighborhood $U$ of $p$ on which $l=[(X_1,\dots,X_n)]$ and $m=[(Y_1,\dots,Y_n)]$ for some  continuous vector fields $X_i$ and $Y_j$ on $U$. Then there exist a matrix valued function $A=[a_i^j]:U\rightarrow GL_n(\mathbb{R})$ such that $Y_j=\sum_{i}a_j^iX_i$ where the entries $[a_j^i]$ can be proved continuous so the determinant $\det A:U\rightarrow \mathbb{R}^{+}$ is also continuous. By intermediate value theorem, the continuous no where vanishing function $\det A$ on the connected $U$ is everywhere positive or everywhere negative. Hence $l=m$ or $l=-m$ on $U$. This proves that $f:M\rightarrow \{1,-1\}$ is locally constant. Since a locally constant function on a connected set is constant so $l=m$ or $l=-m$ on $M$
