RIS phase shift and beamforming matrix

dear sir, i have questions about the RIS scenario : First the RIS elements all passive or we can change to semi-passive . second i want to know how you calculate the phase shift matrix (its random)and beamforming … give me more details about these matrix and how to make it as output like the channel matrix. third, i want to know about the channel matrix in real and imaginary values when i represent the channel matrix as 2D image time-frequency response (how the values calculated , what is it , and the range of these values in channel matrix represented ).