A Lie algebra is is a vector space $L$ equipped with a Lie bracket $[\cdot,\cdot]$.
Given linearly independent vectors $e_1,...,e_n$ and structure constants $[e_i,e_j]=\sum_{k=1}^n a^k_{ij}e_k$ is there a quick way to check if this is a lie algebra
I was trying to show that the sum of two subalgebras need not be a subalgebra and couldn't think of the obvious example of taking an sl-2 tripple. So I tried to define $L=\text{span}(s_1,s_2,t_1,t_2,e_1,e_2)$ by $[s_1,s_2]=s_1$, $[t_1,t_2]=t_1$,$[s_i,t_i]=e_i$. This would give that $S+T$ was not a subalgebra. One can go through the motions of checking all the relations by hand and seeing what we should define the bracket on $e_1,e_2$ but is there a nicer way to ensure that something will be a lie algebra?