Can you prove that over a division ring , every module is both projective and injective? I have problem with this :
  over a division ring or a ring with identity every module is both projective and injective .
  Can you help me?
thank you .
 A: I am just going to ignore the "or over a ring with identity" phrase because it is false and is a pretty weird thing to inject into an otherwise correct question.
There are a couple ways to approach this, depending on what you know
Method 1
A division ring is a semisimple Artinian ring, and it is well known that all modules over a semisimple Artinian ring are projective and injective.
Method 2
In linear algebra, you prove that for a field $F$, every $F$ module is free, being a copy of some number of copies of the $F$ module $F$.
If you check the proofs, you will find out that it does not depend on commutativity at all: the same statement holds for division rings. This suffices to show all modules are projective.
Now, a division ring $D$ is certainly injective as a right module, and since it is also a Noetherian ring, every direct sum of copies of $D$ is injective as well. This shows that all modules are injective.
Alternatively, you can apply Baer's criterion to any module since the right ideals of $D$ are trivial.
A: Theorem. For a ring, the following conditions are equivalent:
(a) Every left $R$-module is injective
(b) Every left $R$-module is projective
Proof. Suppose every left $R$-module is injective and consider a left module $M$, together with an epimorphism $F\to M$, with $F$ free. Then the kernel $K$ of this homomorphism, being injective, is a direct summand of $F$. So the exact sequence $0\to K\to F\to M\to 0$ splits and $M$ is a direct summand of $F$, hence projective.
Suppose every left $R$-module is projective and consider a left module $M$, together with an embedding $M\to E$, where $E$ is injective. Then $E/M$ is projective, so the exact sequence $0\to M\to E\to E/M\to 0$ splits and therefore $M$ is injective, being a direct summand of $E$. QED
For a division ring, it's trivial to verify Baer's criterion, because a division ring $D$ has only $\{0\}$ and $D$ as its left ideals.

Note. The two conditions in the theorem above are equivalent to $R$ being (left) semisimple. For a semisimple ring it's true that every module is a direct sum of simple modules. Over a division ring $D$ there's just one simple module, up to isomorphism, so every module is a direct summand of copies of $D$, in particular it is free.
This is a complicated way to show that the standard concepts of basis for vector spaces extend to (left) modules over a division ring, with no modification.
