Solving the Lie algebra of generators: path from algebra to matrix representation Given the Lie algebra, what is the systematic way to construct the matrix representation of the generators of the desired dimension? I ask this question here because it is the physicists for whom representation of groups is more important than mathematicians. 
Let us, for example, take $SU(2)$ for concreteness. Starting from the generic parametrization of a $3\times 3$ unitary matrix $U$ with $\det U=1$, and using the formula of generators $$J^i=-i\Big(\frac{\partial U}{\partial \theta_i}\Big)_{\{\theta_i=0\}}$$ one can find the $3\times 3$ matrix representation of the generators.
However, I'm looking for something else. 


*

*Given the Lie algebra $[J^i, J^j]=i\epsilon^{ijk}J^k$, is there a way that one can explicitly construct (not by guess or trial) the $3\times 3$ representations of $\{J^i\}$?

*Will the same procedure apply to solve other Lie algebras appearing in physics such as that of $SO(3,1)$ (or $SL(2,\mathbb{C})$)?
 A: More generally, given the adjoint representation
$$ {\rm ad}(x)y ~:=~ [x,y], \qquad x,y~\in~L, \tag{1}$$ 
of an $n$-dimensional Lie algebra $L$ over a field $\mathbb{F}$, with a basis of generators
$$(t_1, \ldots, t_n ),\tag{2}$$
satisfying
$$[t_i,t_j]~=~\sum_{k=1}^n t_k~f^k{}_{ij} ,\qquad 
i,j~\in~\{1,\ldots, n\},\tag{3}$$
where 
$$ f^k{}_{ij}~\in~ \mathbb{F},\qquad i,j,k~\in~\{1,\ldots, n\},\tag{4} $$
are structure constants, then an $n\times n$ matrix representation of the adjoint representation 
$${\rm ad}: L ~~\to~~ {\rm End}(L)\tag{5}$$
is given by the structure constants

$$ {\rm ad}(t_i)^k{}_j~=~f^k{}_{ij},\qquad i,j,k~\in~\{1,\ldots, n\}.\tag{6} $$

Proof of eq. (6): If a Lie algebra element
$$  x~=~\sum_{j=1}^n  t_j~x^j~\in ~L  \tag{7}$$
has components 
$$x^j~\in~\mathbb{F}, \qquad j~\in~\{1,\ldots, n\},\tag{8} $$
then for fixed $i \in~\{1,\ldots, n\}$, the endomorphism
$${\rm ad}(t_i)~\in~{\rm End}(L),\tag{9}  $$
which takes Lie algebra elements in Lie algebra elements
$$ x ~~\mapsto ~~\sum_{j=1}^n ~t_k~x^{\prime k} ~=~x^{\prime}~:=~{\rm ad}(t_i)x
~\stackrel{(1)}{=}~[t_i,x]
~\stackrel{(7)}{=}~\sum_{j=1}^n  [t_i,t_j]~x^j
~\stackrel{(3)}{=}~\sum_{j,k=1}^n t_k~ f^k{}_{ij}~x^j,
  \tag{10}$$
is represented by the matrix
$$\left({\rm ad}(t_i)^k{}_j\right)_{1\leq j,k\leq n},\tag{11}$$
such that the components transform as
$$ x^{\prime k}~=~\sum_{j=1}^n {\rm ad}(t_i)^k{}_j~x^j , \qquad k~\in~\{1,\ldots, n\}.\tag{12} $$
Finally combine eqs. (10) & (12) to derive eq. (6). $\Box$ 
A: If you have the structure constants, i.e. the coefficients $f_{ab}^c$ in the commutation relations $[T_a,T_b]=\sum_c f_{ab}^cT_c$ with $a,b,c\in \{1,\ldots p\}$ then you can construct $p$ matrices $M_a$ (labelled by $a$) of size $p\times p$ with entries $(M_a)_{cb}$.  These matrices will be a $p\times p$ representation of the algebra (in fact, the adjoint representation.)  
This will work for every algebra.  However, in the case of non-compact algebras,  the resulting representation is obviously finite dimensional and thus cannot be make hermitian (i.e. it cannot exponentiate to a unitary, finite dimensional representation of the group.)  
Be aware that in the case of $so(3,1)$, there is a subtle point that comes in going from the complex back to the real form.  Over $\mathbb{C}$, the adjoint of $so(3,1)$ is reducible into $su(2)\oplus su(2)$ but over the reals the adjoint is irreducible.    In other words, for non-compact real forms, there are issues with reducibility and unitary.
A: You got outstanding answers, but they are uncharacteristically abstract for physicists; they assume your students are comfortable with basic Lie algebra theory, as taught to mathematicians, by example, in their first week of such courses. Unfortunately, physicists, who are especially used to being taught by example even more, are not getting such in their first week of remedial group theory courses, as a rule.
So here is a "brass tacks" almost trivial example of a dimension 3 Lie algebra, albeit not familiar to most physicists, Winternitz's "lucky guess" algebra, (chosen to forestall "monkey-see-monkey-do", as virtually ritual in, e.g., rotations):
$$
[ X,Y]=Y, \qquad   [ X,Z]=Z+Y, \qquad[Y,Z]=0. \qquad
$$
Its adjoint representation is the linear map of the 3-vectors of generators
$$ xX+yY+zZ= \begin{pmatrix}
                             x  \\
                             y   \\
                             z 
                           \end{pmatrix},
$$
to another 3-vector in that space, so, effectively, a collection of 3×3 matrices.
By the definition $\operatorname{ad}(J) ~K\equiv [J,K]$, you simply compute the action
$ \operatorname{ad}(X) Y= Y $ , $ \operatorname{ad}(X) Z=Z+ Y $, and null acting on X, naturally.  So it is just represented by the matrix
$$ X_a= \begin{pmatrix}
                             0 & 0 & 0 \\
                             0 & 1 & 1 \\
                             0 & 0 & 1
                           \end{pmatrix}.
$$
Likewise, $ \operatorname{ad}(Y) X= -Y $, and null action on the rest, so
$$ Y_a= \begin{pmatrix}
                             0 & 0 & 0 \\
                             -1 & 0 & 0 \\
                             0 & 0 & 0
                           \end{pmatrix},
$$
and also $ \operatorname{ad}(Z) X= -Z-Y $, null on others, so
$$ Z_a = \begin{pmatrix}
                             0 & 0 & 0 \\
                             -1 & 0 & 0 \\
                             -1 & 0 & 0
                           \end{pmatrix}. 
$$
By the shrewd definition of the adjoint action, the Jacobi identity, these three matrices are guaranteed to satisfy the posited Lie algebra.
The algebra has the distinction of not having been identified in physics, yet.
