I am aware this is about the same question as this question. But I do not believe this is a duplicate post. I am looking to understand some properties about the center and am using this question is a good example. I want to know:
(1) Under what conditions is do we have for $\mathfrak{h}\subset \mathfrak{g}$ to imply $Z(\mathfrak{h})=Z(\mathfrak{g})\cap \mathfrak{h}$
(2) How does the argument I link to conclude that $Z(\mathfrak{sl}(n,F))=Z(\mathfrak{gl}(n,F))\cap \mathfrak{sl}(n,F)$
Since (1) is true in the case of $\mathfrak{sl}(n,F)\subset\mathfrak{gl}(n,F)$ I feel trying to understand an argument which shoes this will help tease out what conditions are needed for the general case. There is a question in Humphreys that asks us:
To show that $\mathfrak{sl}(n,F)$ (matrices with trace zero) has center $0$, unless $\operatorname{char}F$ divides $n$, in which case the center is $\mathfrak{s}(n,F)$ (scalar multiples of the identity).
Some facts that will be useful are that the $Z(\mathfrak{gl}(n,F))$ is $\mathfrak{s}(n,F)$. Also $\mathfrak{gl}(n,F)=\mathfrak{sl}(n,F)+\mathfrak{s}(n,F)$ as vector spaces.
Here is an argument taken from this document of solutions which claims that $Z(\mathfrak{sl}(n,F))=Z(\mathfrak{gl}(n,F))\cap \mathfrak{sl}(n,F)$.:
I will rewrite the argument to show my confusion. If $c\in Z(\mathfrak{sl}(n,F)$ then $[x,c]=0$ for all $x\in \mathfrak{sl}(n,F)$. Obviously $c\in \mathfrak{gl}(n,F)=\mathfrak{sl}(n,F)+\mathfrak{s}(n,F)$, but I do not see why this means that $c\in Z(\mathfrak{gl}(n,F)$. I do not see then why it follows that $Z(\mathfrak{sl}(n,F))=Z(\mathfrak{gl}(n,F))\cap \mathfrak{sl}(n,F)$.