Given a graph $G=(V,E,A)$ where $V$ is the set of the vertices, and $E$ is the set of sides, and $A$ is the adjacency matrix of dimension $n\times n$. $G$ is undirected or directed. We define the elements of $A$: if the side from $v_i$ to $v_j$: $e_{ij}\in E$, then $A_{ji}=1$, otherwise $A_{ji}=0$.
Question is how to mathematically judge if there is a spanning tree (minimal spanning tree) in this graph $G$? "Mathematically" means using the matrices (Laplace matrix, etc), and using mathematical calculus.