A simple question about the defining equation of hyperplane $H = \{z_0 = 0\} \subset \Bbb{CP}^n$ Let $H = \{z_0 = 0\}$ be a hyperplane in $\Bbb{CP}^n$, I know that the local defining equation will be on $U_0 = \{z_0 \ne 0\}$ is $1$  , and on $U_i = \{z_i \ne 0\}$ for $i>1$ is $z_0/z_i$ (as quotient is well defined on the projective space).
I have a silly question does the hyperplane has a global smooth(holomorphic) defining function? (that is some $f$ defined on $\Bbb{CP}^n$ which is defined to be smooth (holomorphic) such that $H = f^{-1}(0)$) is quite tempting to claim that $z_0$ is the global defining function , but it's not well defined on $\Bbb{CP}^n$.
 A: The case of holomorphic functions.
As Didier mentions in the comments, any holomorphic function $f\colon \mathbb{CP}^n \rightarrow \mathbb{C}$ is constant. Thus, for $n\geq1$, there does not exist a holomorphic function $f\colon \mathbb{CP}^n \rightarrow \mathbb{C}$ such that the equality $f^{-1}(0)=\{[z_0:\ldots:z_n]\in \mathbb{CP}^n \ \vert \ z_0=0\}$ holds.
To show Didier's claim, assume for a contradiction that there existed a non-constant holomorphic function $f\colon \mathbb{CP}^n \rightarrow \mathbb{C}$. Any such $f\colon \mathbb{CP}^n \rightarrow \mathbb{C}$ would be open by the Open mapping theorem for holomorphic functions of several variables (Theorem 3.1. in Laurent-Thiébaut's Holomorphic Function Theory in Several Variables). The image $\operatorname{Im}(f)$ would additionally be closed, since $\mathbb{CP}^n$ is compact, $f$ is continuous and $\mathbb{C}$ is Hausdorff. In summary, the image $\operatorname{Im}(f)$ would be both open and closed. Since $\mathbb{C}$ is connected, this would imply that $f$ is surjective. Thus, $\mathbb{C}$ would be the continuous image of a compact set. This contradicts the fact that $\mathbb{C}$ is non-compact.

The case of smooth functions.
However, there does exist a smooth function $f\colon \mathbb{CP}^n \rightarrow \mathbb{C}$ such that the equality $f^{-1}(0)=\{[z_0:\ldots:z_n]\in \mathbb{CP}^n \ \vert \ z_0=0\}$ holds. By above argument such a function cannot be open.
First, recall the following result.

Proposition. A smooth function $f\colon \mathbb{C}^{n+1}\setminus\{0\}\rightarrow \mathbb{C}$ extends to a smooth function $F\colon \mathbb{CP}^n\rightarrow \mathbb{C}$ along $\pi\colon \mathbb{C}^{n+1}\setminus\{0\}\rightarrow \mathbb{CP}^n$ (i.e. $f=F\circ \pi$) if and only if $f$ is a homogeneous function over $\mathbb{C}$ of degree $0$.
Proof. The right implication is clear. For the left implication, the extension is clearly unique if it exists. Namely, for any $[z_0:\ldots:z_n]\in\mathbb{CP}^n$ we are forced to set $F([z_0:\ldots:z_n])\colon=f(z_0,\ldots,z_n)$. Since $f$ is homogeneous of degree $0$, this function $F$ is well-defined. It remains to show that $F$ is smooth. To do so, recall the complex structure on $\mathbb{CP}^n$. Let $i\in\{0,\ldots,n\}$. Define the open sets $$U_i\colon=\{[z_0:\ldots:z_n]\ \vert \ z_i\neq 0\}.$$
Then the charts of $\mathbb{CP}^n$ are given by $\phi_i\colon U_i\rightarrow \mathbb{C}^n$ with $$\phi_i([z_0:\ldots :z_n])=[z_0/z_i:\ldots:z_{i-1}/z_i:1:z_{i+1}/z_i:\ldots:z_n/z_i].$$ The inverse of $\phi_i$ is $$\phi_i^{-1}(z_1,\ldots,z_n)=[z_1:\ldots:z_{i-1}:1:z_i:\ldots:z_n].$$ Now, consider the function $$\psi_i\colon \mathbb{C}^n\rightarrow \mathbb{C}^{n+1}\setminus\{0\}$$ $$(z_1,\ldots,z_n)\mapsto (z_1,z_{i-1},1,z_i,\ldots,z_n).$$ Since $f$ and $\psi_i$ are smooth, so is the function $(F\circ \phi_i^{-1})=f\circ \psi_i$. Thus $F$ is smooth.

The proposition and proof give a linear map from the $\mathbb{C}$-vector space of smooth $\mathbb{C}$-homogeneous functions $\mathbb{C}^{n+1}\setminus\{0\}\rightarrow \mathbb{C}$ of degree $0$ to the $\mathbb{C}$-vector space of all smooth functions $\mathbb{CP}^n\rightarrow\mathbb{C}$ (i.e. $f\mapsto F$). This map is an isomorphism with inverse given by pre-composition with $\pi\colon \mathbb{C}^{n+1}\setminus\{0\}\rightarrow \mathbb{CP}^n$.
Now, what does this have to do with your original question? In summary, we are looking for a smooth $\mathbb{C}$-homogeneous function $f\colon \mathbb{C}^{n+1}\setminus\{0\}\rightarrow \mathbb{C}$ of degree $0$ such that $f^{-1}(0)=\{(z_0,\ldots,z_n) \ \vert \ z_0=0\}.$ Then the corresponding $F \colon \mathbb{CP}^n \rightarrow \mathbb{C}$ is a smooth function such that $F^{-1}(0)= \{[z_0:\ldots:z_n]\in \mathbb{CP}^n \ \vert \ z_0=0\}.$
One class of examples of such functions $f$ can be constructed as follows: Take any smooth norm $\lVert \cdot \rVert$ on $\mathbb{C}^{n+1}\setminus\{0\}$. The $p$-norms for $p\in (1,\infty)$ are such norms, for instance. Then the function $$f\colon \mathbb{C}^{n+1}\setminus\{0\}\rightarrow \mathbb{C}$$
$$(z_0,\ldots,z_n)\mapsto \dfrac{\vert z_0 \vert}{\lVert (z_0,\ldots,z_n)\rVert}$$
is a smooth $\mathbb{C}$-homogeneous function of degree $0$ such that $f^{-1}(0)=\{(z_0,\ldots,z_n) \ \vert \ z_0=0\}.$ Any $\mathbb{C}$-scalar multiple of such a function is again an example.
