The demand for high speed reliable communication systems will never stop increasing. Many challenges face researchers trying to provide such systems and schemes. Cooperative networks have been successfully used to enhance the performance of telecommunication systems. Among different cooperative strategies, distributed cooperative relaying have shown to be a promising scheme. This work addresses the problem of optimizing the precoding vectors in order to improve the system performance of multi-user multi-relay cooperative networks. Precoding vectors are used to cancel out the multiple access interference, maximize the signal to noise ratio at the destination, and optimize the power allocation at relaying stations.