We must multiply matrices that are comprised of the 3 x 4 matrix and 4 X 2 matrix. 1 2 -2 0 -1 3 -3 43
-3 4 7 2 X 0 9 = 18 60
6 0 3 1 1 -11 1 -20
4 -5

We must hard code to arrays to consist of the matrices above. Call a static method of the MatrixMult class called malt which a and b arrays(matrices) are passed. And we recieve back an integer. The matrix mult class should have no constructor. A single static method should be created and recieves two int arrays(matrices). The mult method should return an array that is the product matrix. The code in mult method should determine the dimensions of the matrices.

I have no idea what to do with this program. It sorta makes sense but I don't know where to go with it.

Recommended Answers

All 2 Replies

If you had paid attention in math class you'd have known how to multiply matrices.
If you had paid attention in programming class you'd have known how to write basic Java programs like this.
If you'd had half a brain you'd have figured out how to combine those two bits of knowledge.

Start be declaring the method with the right arguments and return type.
In your math book there should be a parametrized formula with i,j,k indexes for multiplying matrixes. Use that formula, or search the net

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.