X does not have shape m x 1. It is n_x x m, where n_x is the number of input features in each “sample” and m is the number of samples.
Here’s a thread which talks more about dot product versus elementwise multiply and some other issues like broadcasting.
And here’s one that talks about transposes and vectors.