Matrix coefficient How can I solve the following problem:

$$P=X+Y\quad\quad
Q=X\cdot Y,$$
  where $P$, $Q$, $X$ and $Y$ are matrices. What is the condition that $P$ and $Q$ exist? What is the relation between $P$, $Q$, $X$ and $Y$?

I have been confused by this problem for weeks. I can't find a way to solve this problem because there is no commutative law.
 A: The question was what condition is required for $P$ and $Q$ to exist given $X$ and $Y$.
Since $P$ and $Q$ are defined by operations between $X$ and $Y$ we have to be sure those operations are well defined.
$$P=X+Y$$
$P$ is defined as the sum of $X$ and $Y$. These are matrices. The only way the can add is if they have the same number of rows and columns. This isn't particularly deep its just the rule/definition for adding matrices requires this. So if $X$ is an $m \times n$ matrix then so is $Y$. 
$$ Q=X*Y$$
$Q$ is defined by the multiplication of $X$ and $Y$. What has to be true for this operation to be well defined? Look at the rule for multiplying matrices.
For the last part "what is the relations [between these matrices]", I feel that can mean a lot of things. The smart aleck answer would be to that the relationship is the equations. Nothing you can say about these will contain content not contained in the equations. This may require you to ask the writer of the question for clarification as to what they are looking for.
A: For both to be well defined, $X$ and $Y$ need to be square matrices of the same size - let $X\in\mathbb R^{n\times m}$ and $Y\in\mathbb R^{k\times d}$. Since $P=X+Y$ must be well defined,
$$n=k, m=d$$
Since $Q=X\cdot Y$ must be well defined,
$$k=m$$
And thus
$$n=k=m=d$$
so
$$X, Y \in\mathbb R^{n\times n}$$
