Unable to understand dimension mismatch error

Thank you for the response. Does correct shape for x and y mean if x is mxn, then y should be nxp (in terms of matrix multiplication)?