# A product of matrixes that returns 0. instead of the correct result

Posted 9 years ago
1783 Views
|
3 Replies
|
0 Total Likes
|
 Hi all. Today i bumped into this problem: h = 0.25; El = 43*10^3; Et = 8.9*10^3; Glt = 4.5*10^3; vlt = 0.27; n = 4; vtl =vlt*Et/El;  Dloc = 1/(1 - vlt*vtl)*{{El, El*vtl, 0}, {El*vtl, Et,0}, {0, 0, (1 -vlt*vtl)*Glt}};c1 = Cos[Pi/4];s1 = Sin[Pi/4];T1 = {{c1^2, s1^2, c1*s1}, {s1^2, c1^2, -c1*s1}, {-2*c1*s1, 2*c1*s1, c1^2 - s1^2}};c2 = Cos[-Pi/4];s2 = Sin[-Pi/4];T2 = {{c2^2, s2^2, c2*s2}, {s2^2, c2^2, -c2*s2}, {-2*c2*s2, 2*c2*s2, c2^2 - s2^2}};D1 = Transpose[T1].Dloc.T1;D2 = Transpose[T2].Dloc.T2;Dm = 1/n*(2*D1 + 2*D2)beta= -(n*h)^2/(2*n)Dmf = {{0, 0, beta*D2[[1, 3]]}, {0, 0, beta*D2[[2, 3]]}, {beta*D2[[1, 3]], beta*D2[[2, 3]], 0}}A1 = Inverse[Dm]B1 = -A1*DmfThe fact is that Mathematica returns me a B1 matrix full of  "0." when it actually shouldn't. How is it possible that some of the elements of A1 (numbers of the order of 0.0000x)  multiplied by some of the elements of Dmf (of the order of 10xx) return 0? I tried with //N //MatrixForm everywhere and with zero results.Looking forward to your help. Thanks.
3 Replies
Sort By:
Posted 9 years ago
 But then the answer is fine, since for each of the 9 matrix elements either A1 or Dmf has a zero entry, which results in a product of 0.
Posted 9 years ago
 * is element-wise multiplication, perhaps you meant -A1.Dmf
Posted 9 years ago
 No, sorry, no error there. I need that kind of multiplication.