Given integers $m$ and $1 \lt a \lt m$, with $a \vert m$, prove that the equation $ax\equiv 1\pmod{m}$ has no solution. (That is, if $m$ is composite, and $a$ is a factor of $m$ then $a$ has no multiplicative inverse.)
Here is what i have done so far: I have said that if $m$ is even composite number than $a$ must also be even and that $ax-1$ will lead to a odd number therefore no solution. Also $ax\equiv 1\pmod{m}$ implies that there exists a $n$ such that $m=n(ax-1)$, this leaves a remainder of 1 and $m \gt 3 $ and therefore $m\nmid 1$.
For odd composite I am bit stuck and not sure what to do but it makes sense to show that there will be a remainder of $1$ left.
Does this make sense or am i doing it wrong?
Your proof isn't correct for $m$ even. Let $m=10, a=5.$ It need not be the case that a divisor of an even number is itself even.
But there's no need to break this problem up into cases. If $ax \equiv 1 \pmod{m}$, then $m \vert (ax-1)$. But $a \vert m \Rightarrow \exists q (aq=m)$ so
$$m \vert (ax-1) \Rightarrow \exists r(rm=arq=ax-1) \Rightarrow a(x-rq)=1,$$
where everything in sight is an integer and $1 \lt a$. That's not possible, so we have established a contradiction that proves the result.
Edited to add: The simpler way to say this is that because divisibility is transitive, $a \vert m$ and $m \vert (ax-1)$ implies $a \vert (ax-1)$, which obviously isn't possible.