Let G be an undirected graph with vertices {v 1,v 2,…,>;v ⋎} and edges { e 1, e 2, …, e ϵ }. Let M be the ⋎ × ϵ matrix whose ijth entry is 1 if e j is a link incident with v i , 2 if e j is a loop at v i , and 0 otherwise. The matrix obtained by orienting the edges of a loopless graph G (i.e., changing one of the 1's to a − 1 in each column of M) has been studied extensively in the literature. The purpose of this paper is to explore the substructures of G and the vector spaces associated with the matrix M without imposing such an orientation. We describe explicitly bases for the kernel and range of the linear transformation from R ϵ to R ⋎ defined by M. Our main results are determinantal formulas, using the unoriented Laplacian matrix MM t , to count certain spanning substructures of G. These formulas may be viewed as generalizations of the matrix tree theorem. The point of view adopted in this paper also gives rise to a matroid structure on the edges of G analogous to the cycle matroid and its dual. In this setting, the analogue of a spanning forest can have components with one odd cycle, and the analogue of an edge cut has the property that its removal creates a new bipartite component.