Perhaps there's a more clever way, but the method you proposed should work. Remember that you have 18 free parameters.

To simplify things, I'd factor out a -6: A diag{0, -6, 18 }B = (-6) A diag {0, 1, -3} B. To get you started:

If you can choose (I don't know that you can, but it seems possible at first glance) combinations of a's and b's so that the resulting matrix is anything

in , then your ideal I would equal (-6)R, whose number you can count.

What of the other elementary matricies?