Quantum critical point and entanglement in a matrix-product ground state