posterior is proportional to joint? The posterior
$$
P(M|D) = \frac{P(D|M) P(M)}{P(D)}
$$
I think in my first class it said that $P(D)$ is a fixed thing, so it is permissible to ignore it for optimization purpose and use
$$
    P(M|D) \propto P(D|M) P(M)
$$
and I accepted that, it made sense then.
But finally thinking about it, this is effectively saying that
$$
    P(M|D) \propto P(M,D)
$$
which seems just weird. The $P(M|D)$ is a single-variable probability, whereas the $P(M,D)$ is a joint, so not even the dimensionality matches. Is it because we think of this applying only to a single datapoint,
so think of $P(M|D)$ and the other factors as numbers rather than as distribution-like functions?
Edit: 
To expain the question further, ignore probability and imagine two generic functions $f(x)$ and $g(x,y)$.  If we see an equation 
$$
   f(x) \propto g(x,y)
$$
I think it would seem like nonsense, similar to adding my height and weight together to get a single number "86". 
However in the probability case, a good comment below reminded that in
$$
   p(m|d) = \frac{p(m,d)}{p(d)}
$$
the fraction on the right is meaningful, although it involves a 2-variable function on the top, and a 1-variable function on the bottom.
It would make sense to me if we could say that in this case, $d$ is a constant, so $p(m,d)$ is really a function of just one variable, and similarly on the left, $p(m|d)$ is a probability distribution with $m$ varying and $d$ fixed. That way there is just one variable, $m$, on both sides. But is that the right way to think?  If not, then what?
 A: $$
P(D, M) = \underbrace{P(D|M)}_\text{likelihood} \,\underbrace{P(M)}_\text{prior}
$$
by the definition of conditional probability, same definition can be applied to obtain
$$
\underbrace{P(M|D)}_\text{posterior} = \frac{P(D, M)}{P(D)}
$$
The constant $P(D)$ can be dropped, as described in numerous threads, e.g. here, here, here, here, here, or here, what leads to
$$
P(M|D) \propto P(D, M) = P(D|M)\,P(M)
$$
It can be dropped from the computation if you are not interested in estimating the conditional probabilities directly, e.g. when using Naive Bayes algorithm, where you are only interested in finding the highest peak in the probability, or when using MCMC algorithms in Bayesian setting, that can deal with sampling from unnormalized distributions.
When using maximum likelihood approach (see also this thread), while being interested in estimating a parameter, given observed some data $P(M|D)$, we use as a proxy the conditional distribution of observing the data, given the parameter $P(D|M)$ and call this the likelihood function. Maximum likelihood does not use the priors $P(M)$, while Bayesians consider them as important part of the model. So technically yes, you could drop $P(M)$ as well if you don't care about the priors.
