Proving that $\mathfrak{gl}(n,\mathbb{F})=\mathfrak{sl}(n, \mathbb{F}) \oplus \mathfrak{s}(n,\mathbb{F})$. Definitions and the Problem
Let $\mathfrak{gl}(V)$ be the general linear algebra.  This Lie algebra is the set of all endomorphisms, $\operatorname{End}(V)$, of a vector space $V$ over $\mathbb{F}$, endowed with the Lie bracket $[x,y]=xy-yx,$ $\forall x,y \in \operatorname{End}(V).$  After fixing a basis for $V$, we can thereby identify $\mathfrak{gl}(V)$ with the set of all $n \times n$ matrices over $\mathbb{F}$, which we shall denote by $\mathfrak{gl}(n, \mathbb{F})$.
Let $\mathfrak{sl}(V)$ be the special linear algebra, which is a Lie algebra consisting of all endomorphisms of $V$ having trace zero, along with the same Lie bracket, $[x,y]=xy-yx$, $\forall x,y \in \operatorname{End}(V).$  Once again, we can identify $\mathfrak{sl}(V)$ with the set of all $n \times n$ matrices with trace zero, which we shall denote by $\mathfrak{sl}(n, \mathbb{F})$.
Finally, we denote by $\mathfrak{s}(n,\mathbb{F})$ the set of all $n \times n$ scalar matrices, i.e., matrices which are a scalar multiple of the identity.
The problem is from Introduction to Lie Algebras and Representation Theory, by James E. Humphreys, section 1 exercise 7:

If $\operatorname{char} \mathbb{F}$ is $0$ or else a prime not dividing n, prove that $\mathfrak{gl}(n, \mathbb{F}) = \mathfrak{sl}(n, \mathbb{F}) + \mathfrak{s}(n,\mathbb{F})$ (direct sum of vector spaces), with
$[\mathfrak{s}(n,\mathbb{F}), \mathfrak{gl}(n, \mathbb{F})]=0.$

Attempted Solution
Let $e_{ij}$ denote the $n \times n$ matrix with $1$ at the $(i, j)$th entry and $0$ elsewhere.  We can create a basis for $\mathfrak{sl}(n, \mathbb{F})$ by taking all $e_{ij}, \text{for } i \ne j,$ along with all $h_i=e_{ii} - e_{i+1,i+1}$, for $1 \leq i \leq l$, where $l=n-1$.  Thus, any matrix $M \in \mathfrak{sl}(n, \mathbb{F})$ can be written as
$$M = \sum_{(i \ne j)=1}^n a_{ij}e_{ij} + \sum_{i=1}^l b_i h_i. \tag{1}$$
Additionally, a matrix $N \in  \mathfrak{s}(n,\mathbb{F})$ can be written as
$$N = cI = \sum_{i=1}^{l} ce_{ii} + ce_{nn}. \tag{2}$$
Then, adding equations $(1)$ and $(2)$ we get
$$\begin{split} M+N &= \sum_{(i \ne j)=1}^n a_{ij}e_{ij} + \sum_{i=1}^l b_i h_i + \sum_{i=1}^{l} ce_{ii} + ce_{nn}\\ &= \sum_{(i \ne j)=1}^n a_{ij}e_{ij} + \sum_{i=1}^l \big((c + b_i)e_{ii}-b_ie_{i+1,i+1} \big) + ce_{nn} \\ &= \sum_{(i \ne j)=1}^n a_{ij}e_{ij} + \sum_{i=1}^l \big((c + b_i-b_{i-1})e_{ii} + (c-b_l)e_{nn} \end{split}. \tag{3}$$
After renaming the constants, it can be seen that the last equation is equivalent to
$$M+N = \sum_{i,j=1}^n k_{ij}e_{ij}, \tag{4}$$
which is in fact a matrix $M+N=S \in \mathfrak{gl}(n, \mathbb{F})$.  Thus, every $n \times n$ matrix can be written as the sum of a matrix $M \in \mathfrak{sl}(n, \mathbb{F})$ and a matrix $N \in \mathfrak{s}(n,\mathbb{F})$, and therefore $\mathfrak{gl}(n, \mathbb{F}) = \mathfrak{sl}(n, \mathbb{F}) + \mathfrak{s}(n,\mathbb{F}).$
Finally, using equations $(2)$ and $(4)$ along with the fact that $[e_{ij},e_{kl}]=\delta_{jk}e_{il}-\delta_{li}e_{kj},$ it is straightforward to prove that $[N,S]=0$, $\forall N \in  \mathfrak{s}(n,\mathbb{F})$ and $\forall S \in \mathfrak{gl}(n, \mathbb{F}).$  Hence, $[\mathfrak{s}(n,\mathbb{F}), \mathfrak{gl}(n, \mathbb{F})]=0.$
Questions

*

*Is my proof correct? Do you have any suggestions for improvements?


*Is my reasoning correct?  For example, consider the statement I made about equations $(3)$ and $(4)$ being equivalent.  It seems obvious that they are equivalent, but would that constitute as proof?  Is it a proof if you can just "see it"?  Furthermore, consider what I said in order to prove $[\mathfrak{s}(n,\mathbb{F}), \mathfrak{gl}(n, \mathbb{F})]=0$. I just used an arbitrary element of each algebra and verified that the commutator vanishes; does that constitute as a proof of the required statement,i.e.,$[\mathfrak{s}(n,\mathbb{F}), \mathfrak{gl}(n, \mathbb{F})]=0$?


*I do not see what the purpose of $\operatorname{char} \mathbb{F}$ being either $0$ or a prime not dividing $n$ is.  Why do we need it?
As a last note, I'm a physicist, so I'm not very familiar with proof-writting.
Any help will be greatly appreciated!
 A: I had written a bunch of comments (now deleted) which I might as well turn into an answer:
Ad 1. Your proof shows that $\mathfrak{sl}_n(F) + \mathfrak{s}_n(F) \subseteq \mathfrak{gl}_n(F)$ which was sort of clear beforehand. To show the other inclusion, you need to make use of the condition on the characteristic. Your proof also does not show that $\mathfrak{sl}_n(F) \cap \mathfrak{s}_n(F) = \{0\}$.
As suggested in comments by Dietrich Burde and JonathanZ supports MonicaC, a much more straightforward proof (that also makes clear why we need $n$ to be invertible in $F$) is to show that the map
$$\mathfrak{gl}_n(F) \rightarrow \mathfrak{sl}_n(F) \oplus \mathfrak{s}_n(F)$$
$$A \mapsto (A-\frac{1}{n}tr(A) \cdot I_n, \frac{1}{n}tr(A) \cdot I_n)$$
is an isomorphism.
Ad 2. First issue: While equation (4) follows from (3) by just renaming coefficients, the other way around does not follow without making use of the condition on the characteristic. In fact, e.g. if you try to write the matrix $\pmatrix{1&0\\0&0 }$ with your basis, you'll need $c+b_1=1$ and also $c-b_1=0$. Now if $char(F) \neq n=2$, there's the obvious solution $c=b_1=\frac12$; but if $char(F)=2$, these two equations have no simultaneous solution. You should encounter a similar issue for other $n$. Note that as soon as you can divide by $n$ (which is equivalent to saying $char(F)$ does not divide $n$), all should be good and you can solve your system of equations, so (3) and (4) are equivalent, so you have truly shown both inclusions.
Second issue: It is correct that $[\mathfrak s_n(F), \mathfrak{gl}_n(F)] =0$ (hence of course $[\mathfrak s_n(F), \mathfrak{sl}_n(F)] =0$), this does not need the condition on the characteristic, and I believe you don't have to show more than you did to prove that. However, this does not in general imply that $\mathfrak s_n(F) \cap \mathfrak{sl}_n(F) = \{0\}$. (It only shows that $s_n(F) \cap \mathfrak{sl}_n(F)$ is an abelian Lie algebra.) In fact, to show that this intersection is trivial, you do need the condition on the characteristic again. (Because if we don't have it, e.g. again for $char(F)=2$ we have $\pmatrix{1&0\\0&1} = \pmatrix{1&0\\0&-1} \in s_n(F) \cap \mathfrak{sl}_n(F)$.)
This one is easy with that though. Let $S = s \cdot I_n \in s_n(F) \cap \mathfrak{sl}_n(F)$, i.e. $0=tr(S) = n \cdot s$. Then if $char(F)$ does not divide $n$, necessarily $s=0$ and hence $S$ was the zero matrix.
[Finally, to resolve some confusion in the comments, once you have shown that $s_n(F) \cap \mathfrak{sl}_n(F) =\{0\}$ i.e. that it is really a direct sum of vector spaces, then that other fact you've shown, $[s_n(F),\mathfrak{sl}_n(F)]=0$, shows that it is also a direct sum of Lie algebras.]
Ad 3. See both issues in 2.
