I have two $77 \times 8$ matrices where rows represent firm ids:
input quantity matrix, $X$, where columns represent quantity types (e.g., grain, seed, and chemical).
price matrix, $W$, where columns represent prices of the corresponding quantities from $X$.
I want to calculate the total cost for each id but since the dimensions of the matrices are non-conformable I take the transpose of $W$ and calculate $$X W^{T}$$ which is a $77 \times 77$ matrix. How do I interpret the result? If I've done this incorrectly then how do I identify the total cost for each id?
Example
The matrix $X$:
Quantity 1 Quantity 2 Quantity 3
Firm 1 13.727112 11.134628 6.898464
Firm 2 3.252877 17.258291 7.429559
Firm 3 8.793248 5.896631 9.765461
Firm 4 11.943213 13.869619 14.947700
Firm 5 17.133765 16.214109 6.019190
Firm 6 16.390385 10.711969 12.892855
Firm 7 12.650650 4.110215 14.750364
The matrix $W$:
Price 1 Price 2 Price 3
Firm 1 1.684008 2.9795928 2.664915
Firm 2 2.423838 2.6259991 2.289327
Firm 3 2.579981 1.9127199 2.229167
Firm 4 2.450678 2.9854698 1.705296
Firm 5 2.099541 0.8551909 2.632429
Firm 6 1.375625 1.7132088 2.287841
Firm 7 2.429695 1.2428014 2.731882
Using the Hadamard product,
$$\mbox{diag}^{-1} \left( {\bf X} {\bf W}^\top \right) = \left( {\bf X} \circ {\bf W} \right) {\bf 1}_8$$
as mentioned in equation $(73)$ of Minka's Old and new Matrix Algebra useful for Statistics.