I am trying to make this matrix with the lines over it, as the image:

I know the matrix environment but I don’t know how to do this. Thanks.
I am trying to make this matrix with the lines over it, as the image:

I know the matrix environment but I don’t know how to do this. Thanks.