Let A(x) = A(0)+x(1)A(1)+...+x(n)A(n) be a linear matrix, or pencil, generated by given symmetric matrices A(0), A(1,)...,A(n) of size m with rational entries. The set of real vectors x such that the pencil is positive semidefinite is a convex semialgebraic set called spectrahedron, described by a linear matrix inequality. We design an exact algorithm that, up to genericity assumptions on the input matrices, computes an exact algebraic representation of at least one point in the spectrahedron, or decides that it is empty. The algorithm does not assume the existence of an interior point, and the computed point minimizes the rank of the pencil on the spectrahedron. The degree d of the algebraic representation of the point coincides experimentally with the algebraic degree of a generic semidefinite program associated to the pencil. We provide explicit bounds for the complexity of our algorithm, proving that the maximum number of arithmetic operations that are performed is essentially quadratic in a multilinear Bezout bound of d. When m (resp., n) is fixed, such a bound, and hence the complexity, is polynomial in n (resp., m). We conclude by providing results of experiments showing practical improvements with respect to state-of-the-art computer algebra algorithms.