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 (LMI). 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 Bézout 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.The central object of this paper is the subset of x ∈ R n such that the eigenvalues of A(x) are all nonnegative, that is the spectrahedronHere 0 means "positive semidefinite" and A(x) 0 is called a linear matrix inequality (LMI). The set S is convex closed basic semi-algebraic. This paper addresses the following decision problem for the spectrahedron S :Problem 1 (Feasibility of semidefinite programming) Compute an exact algebraic representation of at least one point in S , or decide that S is empty.We present a probabilistic exact algorithm for solving Problem (1). The algorithm depends on some assumptions on input data that are specified later. If S is not empty, the expected output is a rational parametrization (see e.g. [55]) of a finite set Z ⊂ C n meeting S in at least one point x * . This is given by a vector (q 0 , . . . , q n+1 ) ⊂ Z[t] n+2 and a linear form λ = λ 1 x 1 + · · · + λ n x n ∈ Q[t] such that deg(q n+1 ) = ♯Z, deg(q i ) < deg(q n+1 ) for 0 ≤ i ≤ n, gcd(q n+1 , q 0 ) = 1 and Z coincides with the set