We describe semidefinite programming methods for system realization and identification. For each of these two applications, a variant of a simple subspace algorithm is presented, in which a low-rank matrix approximation is computed by minimizing the nuclear norm (sum of singular values) of a structured matrix. This technique preserves linear matrix structure in the low-rank approximation, an important advantage over standard approaches based on the singular value decomposition.