Ideas of finding counterexamples? The questions are from an exercise in Gibert Strang's Linear Algebra.

Construct $2$ by $2$ matrices such that the eigenvalues of $AB$ are not the products of the eigenvalues of $A$ and $B$, and the eigenvalues of $A+B$ are not the sums of the individual eigenvalues. 

It's obvious that either $A$ or $B$ is NOT diagonal matrix. 
Here is my question:
How should I approach the construction? Any heuristics?

Added:
This seems to be a rather "stupid" question. Trial and error with MATLAB may lead to the results. However, I'd like to go a little bit further. "Trial and error" can be viewed as one kind of method for counterexample finding. My second question may be more "stupid" and very vague:

Can any one come up with a "general idea" for the construction of counterexamples in mathematics? 

 A: Finding counterexamples is something of a dark art; I have seen literally no mathematical writing of any kind which explicitly discusses how one might go about doing it, even though it is quite an important mathematical skill. Here are some thoughts off the top of my head.
Don't underestimate trial and error. It's generally easy to do, and it is often very enlightening. You don't have an excuse not to do it, especially if you have a CAS. (Conceptual explanations are overrated in situations like this. Sometimes a statement is false just because it has no reason to be true, and if your intuition tells you otherwise, update your intuition.)
Sometimes blindly constructing a counterexample works. In certain situations, you can look at the list of properties a counterexample needs to satisfy and just write down an example which satisfies the first property, modify it to satisfy the second, etc. and there will be essentially no obstruction to doing this. This is also generally easy to do, when it works. 
Become familiar with small examples, and know ways of constructing large ones. (This is extraordinarily important, and it seems to me that relatively few students ever bother to do it.) Sometimes trial and error is difficult because it's unclear how to construct a random example to check. For matrices this is fairly straightforward, but for other types of objects (such as groups) it may be less so. 
So if you want to find a counterexample in group theory, for example, you should become familiar with the classification of groups of small order, and you should also know ways of constructing larger, complicated groups (such as $S_n, \text{GL}_n(\mathbb{F}_p)$, semidirect products, etc.). 
Make sure your examples somehow exhaust the complexity of the objects in question: looking at abelian groups to construct a counterexample to a statement about groups could work, but if it doesn't you should quickly start looking further. 
Try to prove that no counterexamples exist. This can often be helpful. If there's some assumption you seem to need to make a simple proof work, look at examples that violate that assumption. If you don't even know where to start, go back to trial and error until you have a better feeling for how the objects in question behave.
(Advanced:) Become familiar with standard counterexamples. Some fields of mathematics, such as general topology, have well-known counterexamples that would be difficult to come up with on your own, so most of the time you're better off learning what they are than trying to come up with your own. Standard counterexamples, or the ideas behind them, can often be modified or combined to give counterexamples to other statements. 
A: Less philosophically, I think Strang's exercise is not a "well-posed" one in that it seems to assume that there should be some sort of "canonical" order in the set of eigenvalues of a matrix, doesn't it?
I mean, let's say that $\lambda_X, \mu_X$ are the eigenvalues of $X$ for $X$ a $2\times 2$ matrix. Then, what's the meaning of the question for the product? For instance:
$$
\lambda_{AB} \neq \lambda_A \lambda_B \ ,\qquad \text{or} \qquad \lambda_{AB} \neq \lambda_A \mu_B \ , \qquad\text{or both?}
$$
Anyway, assuming that the question has some sense, then the next step could be the following: $A$ and $B$ cannot be diagonal matrices as you say, right. But they can be diagonalizable, as long as they're so in different bases. Otherwise, the eigenvalues of $AB$ and $A + B$ would certainly still be "the" products and "the" sums,  of those of $A$ and $B$.
So, one could start with an easy matrix such as
$$
A =
\begin{pmatrix}
1 & 0 \\
0 & -1
\end{pmatrix}
$$
with obvious eigenvalues $1,-1$, and make a basis change with it. For instance, with the basis $\left\{ (1,1), (1,-1) \right\}$. You would obtain
$$
B=
\begin{pmatrix}
0 & 1 \\
1 & 0
\end{pmatrix}
$$
with the same eigenvalues as $A$. Now, if you compute
$$
AB =
\begin{pmatrix}
0 & 1 \\
-1  & 0
\end{pmatrix}
\qquad \text{and} \qquad
A + B =
\begin{pmatrix}
1 & 1 \\
1 & -1
\end{pmatrix} \ .
$$
The eigenvalues of $AB$ are $i,-i$, and those of $A+B$ are $\sqrt{2}, -\sqrt{2}$, which are certainly not, respectively, "the" products, or "the" sums of those of $A$ and $B$.
A: My favorite approach in finding counterexamples whenever I am not familiar enough with the mathematical object $M$ is a top down approach.
Start with the most general example of $M$, and the find the condition that all counterexamples of M has to violate, then pick one concrete counterexample from this set of counterexamples:
For this example, here, $M$ is "the matrices $A$, $B$ that satisfy the property stated in the OP"
For example consider matrices:
$$A=\begin{pmatrix}a&b\\c&d\end{pmatrix}, B=\begin{pmatrix}e&f\\g&h\end{pmatrix}$$
Then
$$A+B=\begin{pmatrix}a+e&b+f\\c+g&d+h\end{pmatrix}, AB=\begin{pmatrix}ae+bg&af+bh\\ce+dg&cf+dh\end{pmatrix}$$
Now the characteristic equations are (Either direct computation or using the nice property that for n=2 matrices, the $cp_A(x)=x^2-\text{tr}(A)+\det(A)$)
$$cp_A(x)=x^2-x(a+d)+(ad-bc)=0\\
cp_B(x)=x^2-x(e+h)+(eh-fg)=0\\
cp_{A+B}(x)=x^2-x(a+e+d+h)+((a+e)(d+h)-(b+f)(c+g))=0\\
cp_{AB}(x)=x^2-x(ae+bg+cf+dg)+((ae+bg)(cf+dh)-(af+bh)(ce+dg))=0$$
Therefore the quadratic formula said the eigenvalues are
$$
x_A=\frac{(a+d)\pm\sqrt{(a+d)^2-4(ad-bc)}}{2}\\
x_B=\frac{(e+h)\pm\sqrt{(e+h)^2-4(eh-fg)}}{2}\\
x_{A+B}=\frac{(a+e+d+h)\pm\sqrt{(a+e+d+h)^2-4((a+e)(d+h)-(b+f)(c+g))}}{2}\\
x_{AB}=\frac{(ae+bg+cf+dg)\pm\sqrt{(ae+bg+cf+dg)^2-4((ae+bg)(cf+dh)-(af+bh)(ce+dg))}}{2}$$
This looks very messy thus let's simply it using traces and determinants (Note: only feasible for n=2)
$$
x_A=\frac{\text{tr}(A)\pm\sqrt{(\text{tr}(A))^2-4\det(A))}}{2}\\
x_B=\frac{\text{tr}(B)\pm\sqrt{(\text{tr}(B))^2-4\det(B))}}{2}\\
x_{A+B}=\frac{\text{tr}(A+B)\pm\sqrt{(\text{tr}(A+B))^2-4\det(A+B))}}{2}\\
x_{AB}=\frac{\text{tr}(AB)\pm\sqrt{(\text{tr}(AB))^2-4\det(AB))}}{2}$$
Call the squreroot terms of $x_A$ and $x_B$, as $s_A$ and $s_B$ respectively to reduce the visual clutter on the next step
Now compute the sum and product of eigenvalues
$$x_A+x_B=\frac{\text{tr}(A)+\text{tr}(B)\pm s_A\pm s_B}{2}\\
x_Ax_B=\frac{\text{tr}(A)\text{tr}(B)\pm \text{tr}(A)s_B\pm \text{tr}(B)s_A\pm s_As_B}{4}$$
Now since $\text{tr}(A+B)=\text{tr}(A)+\text{tr}(B)$, comparing $x_A+x_B$ with $x_{A+B}$ shows that the trace of $A$ and $B$ is not what causes the counterexamples to be possible
This means the values a,d,e,h and the traces of $A$ and $B$ does not affect whether the matrices will satisfy the condition required by the counterexample. Thus we can set them all to zero to save ourselves some trouble (Thus we are just starting to pick a counterexample from the set of counterexamples for $M$)
So our equations reduces to
$$
x_A=\frac{\pm\sqrt{-4\det(A))}}{2}\\
x_B=\frac{\pm\sqrt{-4\det(B))}}{2}\\
x_{A+B}=\frac{\pm\sqrt{-4\det(A+B))}}{2}\\
x_{AB}=\frac{\text{tr}(AB)\pm\sqrt{(\text{tr}(AB))^2-4\det(AB))}}{2}$$
$$x_A+x_B=\frac{\pm \sqrt{-4\det(A))}\pm \sqrt{-4\det(B))}}{2}\\
x_Ax_B=\frac{\pm \sqrt{-4\det(A))}\sqrt{-4\det(B))}}{4}$$
$$AB=\begin{pmatrix}bg&0\\0&cf\end{pmatrix}\\
A+B=\begin{pmatrix}0&b+f\\c+g&0\end{pmatrix}$$
$$A=\begin{pmatrix}0&b\\c&0\end{pmatrix}, B=\begin{pmatrix}0&f\\g&0\end{pmatrix}$$
Now consider
$$\sqrt{(\text{tr}(AB))^2-4\det(AB))}=\sqrt{(bg+cf)^2-4bgcf}=\sqrt{(bg)^2+2bgcf+(cf)^2-4bgcf}=\sqrt{(bg-cf)^2}=\pm(bg-cf)$$
Thus giving
$$
x_A=\pm\sqrt{bc}\\
x_B=\pm\sqrt{fg}\\
x_{A+B}=\pm\sqrt{bc+bg+fc+fg}\\
x_{AB}=\frac{(bg+cf)\pm(bg-cf)}{2}=\text{bg or cf}$$
$$x_A+x_B=\pm \sqrt{bc}\pm \sqrt{fg}\\
x_Ax_B=\pm \sqrt{bc}\sqrt{fg}$$
Solving the equation in terms of $x_A$ and $x_B$
$$
x_A=\pm\sqrt{bc}\\
x_B=\pm\sqrt{fg}\\
x_{A+B}=\pm\sqrt{x_A^2+bg+fc+x_B^2}\\
x_{AB}=\frac{g}{c} x_A^2\text{ or }\frac{c}{g} x_B^2$$
$$x_A+x_B\\
x_Ax_B$$
So in order for $M$ to be true, that is
$$x_Ax_B\neq x_{AB}\\
x_A+x_B\neq x_{A+B}$$
you have
$$bg+fc\neq\pm2\sqrt{bc}\sqrt{fg}\\
fg\neq \frac{g^2b}{c}\text{ or }bc\neq 0$$
The equation above is underdetermined (4 unknowns with 2 equations), thus let's simplify it by assuming $f=g=1$ to obtain
$$b+c\neq 2\sqrt{bc}\\
b\neq c\text{ or }bc\neq 0$$
So there's a lot of possible choices here, let's choose $c=1$, therefore,
$$b+1\neq 2\sqrt{b}\Rightarrow (b+1)^2\neq 4b \Rightarrow b\neq 1\text{ or }0$$
So let's choose $b=2$
Therefore, ONE solution to $M$, that is the required counterexample is
$$A=\begin{pmatrix}0&2\\1&0\end{pmatrix}, B=\begin{pmatrix}0&1\\1&0\end{pmatrix}$$
$$A+B=\begin{pmatrix}0&3\\2&0\end{pmatrix}, AB=\begin{pmatrix}2&0\\0&1\end{pmatrix}$$
Here $A$ has eigenvalues $\sqrt{2}$ and $-\sqrt{2}$, $B$ has eigenvalues 1 and -1, while $A+B$ has eigenvalues $-\sqrt{6}$ and $\sqrt{6}$ and $AB$ has eigenvalues 2 or 1. It is then easy to check that no possible products or sums of eigenvalues of $A$ and $B$ matches at least one of those in $A+B$ and $AB$ (in fact, it turns out this particular counterexample, even the sum and products of eigenvalues in just $A$ or $B$ cannot equal to those of $A+B$ or $AB$ thus making it a pretty broken (hence almost perfect) counterexample.
Woa this is LONG!
Anyway here are the pros and cons of using this method

Pros
  
  
*
  
*After the calculation, not only you will get at least one counterexample (provided there actually exists one as some problems it turns out the counterexample set is empty), you will also understand how, in the fundamental level, it is a counterexample.
  
*This method guarantee to not only give you one counterexample, but it gives ALL possible counterexamples (or a subset of it) that is possible for the problem (in other words, the "solution set of counterexamples" to the given problem). It also tells you the constraint the elements has to satisfy to be a counterexample, thus deepen your understanding on the mathematical object in question, so that when similar problem arises, you can use that along with trial and error and other methods suggested by Qiaochu to roughly work out what direction you should head to find the counterexample. The constraint can then be modified slightly in order to find new counterexamples to a related problem or to explore the properties of more exotic mathematical objects where the usual rules don't apply
  
  
  Cons

  
*As you can see in this answer, exploring  the "Space of Counterexamples" is in general a very tedious, inefficient, error prone and time consuming task, thus obviously this is not recommended in exam conditions (unless you can do algebra quickly or know the mathematical object well enough to take shortcuts). Therefore, it is best to treat this method as a last resort after all other method fails, unless you are interested in exploring the mathematical object thoroughly
  
*It is often easy to get lost, misleaded and accidentally left mathematics when exploring the space of counterexamples, resulting in philosophical and possibly metaphysical questions like this one

