1. Let $P$ be any point on the graph of the function $y=x+\frac{2}{x}(x>0)$, and draw perpendiculars from point $P$ to the line $y=x$ and the $y$-axis, with the feet of the perpendiculars being $A$ and $B$, respectively. Then the value of $\overrightarrow{P A} \cdot \overrightarrow{P B}$ is $\qquad$ .
Solution: -1.
【Method 1】Let $P\left(x_{0}, x_{0}+\frac{2}{x_{0}}\right)$, then the equation of the line $P A$ is
$$
y-\left(x_{0}+\frac{2}{x_{0}}\right)=-\left(x-x_{0}\right) \text {, i.e., } y=-x+2 x_{0}+\frac{2}{x_{0}} \text {. }
$$

From $\left\{\begin{array}{l}y=x, \\ y=-x+2 x_{0}+\frac{2}{x_{0}},\end{array}\right.$ we get $A\left(x_{0}+\frac{1}{x_{0}}, x_{0}+\frac{1}{x_{0}}\right)$.
Also, $B\left(0, x_{0}+\frac{2}{x_{0}}\right)$, so $\overrightarrow{P A}=\left(\frac{1}{x_{0}},-\frac{1}{x_{0}}\right), \overrightarrow{P B}=\left(-x_{0}, 0\right)$.
Thus, $\overrightarrow{P A} \cdot \overrightarrow{P B}=\frac{1}{x_{0}} \cdot\left(-x_{0}\right)=-1$.
【Method 2】As shown in Figure 1, let $P\left(x_{0}, x_{0}+\frac{2}{x_{0}}\right)\left(x_{0}>0\right)$, then the distances from point $P$ to the line $x-y=0$ and the $y$-axis are respectively
$$
|P A|=\frac{\left|x_{0}-\left(x_{0}+\frac{2}{x_{0}}\right)\right|}{\sqrt{2}}=\frac{\sqrt{2}}{x_{0}},|P B|=x_{0} .
$$

Since $O, A, P, B$ are concyclic (with $O$ being the origin), $\angle A P B=\pi-\angle A O B=\frac{3 \pi}{4}$. Therefore, $\overrightarrow{P A} \cdot \overrightarrow{P B}=|\overrightarrow{P A}| \cdot|\overrightarrow{P B}| \cos \frac{3 \pi}{4}=-1$.