Let $(P,M,G)$ be a principal bundle with connection 1-form $\omega$. In all books I have seen so far, the curvature is defined by
\begin{equation}
F:=D\_{\omega}\omega \in \Omega({P,\mathfrak{g}})
\end{equation}
with
\begin{equation}
(D\_{\omega}\omega)\_p(X\_1,...,X\_k)=d \omega\_p(X\_1^H,...,X\_k^H)
\end{equation}
where $X\_i^H$ means the projection on the horizontal part.
However wikipedia (<https://en.wikipedia.org/wiki/Gauge_theory_(mathematics)>) states, that the curvature can be also see as
\begin{equation}
F(X\_1,X\_2)=[X\_1^\#,X\_2^\#]-[X\_1,X\_2]^\# \in \Omega(M,ad(P))
\end{equation}
where # denotes the horizontal lift of the vector fields.
What is the exact connection of the two definitions. How can I derive them from each other. I would also be very grateful if someone could provide a reference where the definition wikipedia uses is discussed.



Curvature of principal bundle
I'll use $\Omega \in \Omega^2(P,\mathfrak{g})$ to denote the curvature tensor of $\omega$.
One way of identifying these two expressions is through Cartan's structure equation
$$\Omega = d\omega + \frac{1}{2}\omega \wedge \omega.$$
A reference is Kobayashi-Nomitsu's book, Chapter II.5;
here we use the convention
$$d \omega(X,Y) = \frac{1}{2}(X \cdot \omega(Y) - Y \cdot \omega(X) - \omega([X,Y]))$$
where $X$ and $Y$ are local sections of $TP$.


Since $\Omega$ is horizontal and $\omega$ sends horizontal sections to $0$,
we have
$$\Omega(X,Y) = \Omega(X^H,Y^H) = -\frac{1}{2}\omega([X^H,Y^H]).$$
As $[X^H,Y^H]^H = [X,Y]^H$ and $\omega$ sends any local section to its vertical part,
we have
$$\omega([X^H,Y^H]) = [X^H,Y^H] - [X^H,Y^H]^H = [X^H,Y^H] - [X,Y]^H.$$
Finally, you can compare $\Omega(X,Y)$ with $F(X,Y)$ in your question through
the canonical isomorphism from
the subspace of $\Omega^2(P,\mathfrak{g})$ consisting of $G$-equivariant horizontal 2-forms
to $\Omega^2(M,ad(P))$.


