  Given a local gapped Hamiltonian with a global symmetry on a one dimensional
lattice we describe a method to identify if the Hamiltonian belongs to a
quantum phase in which the symmetry is spontaneously broken in the ground
states or to a specific symmetry protected phase, without using local or string
order parameters. We obtain different matrix product state (MPS) descriptions
of the symmetric ground state(s) of the Hamiltonian by restricting the MPS
matrices to transform under different projective representations of the
symmetry. The phase of the Hamiltonian is identified by examining which MPS
descriptions, if any, are injective, namely, whether the largest eigenvalue of
the "transfer matrix" obtained from the MPS is unique. We demonstrate the
method for translation invariant Hamiltonians with a global SO(3), Z_2 and Z_2
x Z_2 symmetry on an infinite chain.
