Input and Output Impedance parameters of two port network
For the input impedance, expand the matrix equation and then use the output condition: \$Z_L=-\large \frac{V_2}{I_2}\$ 

Similar approach for the output impedance.