Mathematica won't multiply a numeric matrix by a symbolic matrix [duplicate]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite













This question already has an answer here:



  • Why does MatrixForm affect calculations?

    4 answers



If



I1 = 1,0,1,-1


and



Acl = A , -B*K,C*L, A-B*K-C*L 


where A, B, C, and D are not defined in the notebook. When I multiply the two matrices like this:



I1.Acl 


Mathematica gives me the following:



Not actually multiplied together



Whereas if I don't multiply the I1 and Acl but multiply the contents of the variables directly (with parenthesis around each element of the matrice). Mathematica gives me the answer as I would expect. Like this:



Desired form



How can I multiply a two symbolic matrices together such that I get an answer that an actual matrice multiplication instead of just displaying what I asked Mathematica to do. I'm sure this is a stupid question, but I searched Stack Exchange for 10 minutes using various search strings. In addition I searched Youtube, and Google.



Wolfram alpha gives me the answer as I would have expected. In the same form as if I had done the multiplication by hand. Mathematica won't.



Mathematica Version 11.3










share|improve this question















marked as duplicate by J. M. is somewhat okay.♦ Oct 1 at 4:02


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • Note also that you shouldn't use upper-case symbols in Mathematica. Built-in functions always begin with upper-case letters; and so user-defined functions and all symbolic variables should use lower-case letters. For example, in your case, C and K have built-in meaning, which could lead to unexpected results (you can tell whether a variable has been assigned a value/definition by the colouring).
    – AccidentalFourierTransform
    Oct 1 at 1:26














up vote
2
down vote

favorite













This question already has an answer here:



  • Why does MatrixForm affect calculations?

    4 answers



If



I1 = 1,0,1,-1


and



Acl = A , -B*K,C*L, A-B*K-C*L 


where A, B, C, and D are not defined in the notebook. When I multiply the two matrices like this:



I1.Acl 


Mathematica gives me the following:



Not actually multiplied together



Whereas if I don't multiply the I1 and Acl but multiply the contents of the variables directly (with parenthesis around each element of the matrice). Mathematica gives me the answer as I would expect. Like this:



Desired form



How can I multiply a two symbolic matrices together such that I get an answer that an actual matrice multiplication instead of just displaying what I asked Mathematica to do. I'm sure this is a stupid question, but I searched Stack Exchange for 10 minutes using various search strings. In addition I searched Youtube, and Google.



Wolfram alpha gives me the answer as I would have expected. In the same form as if I had done the multiplication by hand. Mathematica won't.



Mathematica Version 11.3










share|improve this question















marked as duplicate by J. M. is somewhat okay.♦ Oct 1 at 4:02


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • Note also that you shouldn't use upper-case symbols in Mathematica. Built-in functions always begin with upper-case letters; and so user-defined functions and all symbolic variables should use lower-case letters. For example, in your case, C and K have built-in meaning, which could lead to unexpected results (you can tell whether a variable has been assigned a value/definition by the colouring).
    – AccidentalFourierTransform
    Oct 1 at 1:26












up vote
2
down vote

favorite









up vote
2
down vote

favorite












This question already has an answer here:



  • Why does MatrixForm affect calculations?

    4 answers



If



I1 = 1,0,1,-1


and



Acl = A , -B*K,C*L, A-B*K-C*L 


where A, B, C, and D are not defined in the notebook. When I multiply the two matrices like this:



I1.Acl 


Mathematica gives me the following:



Not actually multiplied together



Whereas if I don't multiply the I1 and Acl but multiply the contents of the variables directly (with parenthesis around each element of the matrice). Mathematica gives me the answer as I would expect. Like this:



Desired form



How can I multiply a two symbolic matrices together such that I get an answer that an actual matrice multiplication instead of just displaying what I asked Mathematica to do. I'm sure this is a stupid question, but I searched Stack Exchange for 10 minutes using various search strings. In addition I searched Youtube, and Google.



Wolfram alpha gives me the answer as I would have expected. In the same form as if I had done the multiplication by hand. Mathematica won't.



Mathematica Version 11.3










share|improve this question
















This question already has an answer here:



  • Why does MatrixForm affect calculations?

    4 answers



If



I1 = 1,0,1,-1


and



Acl = A , -B*K,C*L, A-B*K-C*L 


where A, B, C, and D are not defined in the notebook. When I multiply the two matrices like this:



I1.Acl 


Mathematica gives me the following:



Not actually multiplied together



Whereas if I don't multiply the I1 and Acl but multiply the contents of the variables directly (with parenthesis around each element of the matrice). Mathematica gives me the answer as I would expect. Like this:



Desired form



How can I multiply a two symbolic matrices together such that I get an answer that an actual matrice multiplication instead of just displaying what I asked Mathematica to do. I'm sure this is a stupid question, but I searched Stack Exchange for 10 minutes using various search strings. In addition I searched Youtube, and Google.



Wolfram alpha gives me the answer as I would have expected. In the same form as if I had done the multiplication by hand. Mathematica won't.



Mathematica Version 11.3





This question already has an answer here:



  • Why does MatrixForm affect calculations?

    4 answers







matrix






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Oct 1 at 1:05









David G. Stork

21.7k11747




21.7k11747










asked Sep 30 at 22:35









frequencydrive

205




205




marked as duplicate by J. M. is somewhat okay.♦ Oct 1 at 4:02


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






marked as duplicate by J. M. is somewhat okay.♦ Oct 1 at 4:02


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.













  • Note also that you shouldn't use upper-case symbols in Mathematica. Built-in functions always begin with upper-case letters; and so user-defined functions and all symbolic variables should use lower-case letters. For example, in your case, C and K have built-in meaning, which could lead to unexpected results (you can tell whether a variable has been assigned a value/definition by the colouring).
    – AccidentalFourierTransform
    Oct 1 at 1:26
















  • Note also that you shouldn't use upper-case symbols in Mathematica. Built-in functions always begin with upper-case letters; and so user-defined functions and all symbolic variables should use lower-case letters. For example, in your case, C and K have built-in meaning, which could lead to unexpected results (you can tell whether a variable has been assigned a value/definition by the colouring).
    – AccidentalFourierTransform
    Oct 1 at 1:26















Note also that you shouldn't use upper-case symbols in Mathematica. Built-in functions always begin with upper-case letters; and so user-defined functions and all symbolic variables should use lower-case letters. For example, in your case, C and K have built-in meaning, which could lead to unexpected results (you can tell whether a variable has been assigned a value/definition by the colouring).
– AccidentalFourierTransform
Oct 1 at 1:26




Note also that you shouldn't use upper-case symbols in Mathematica. Built-in functions always begin with upper-case letters; and so user-defined functions and all symbolic variables should use lower-case letters. For example, in your case, C and K have built-in meaning, which could lead to unexpected results (you can tell whether a variable has been assigned a value/definition by the colouring).
– AccidentalFourierTransform
Oct 1 at 1:26










1 Answer
1






active

oldest

votes

















up vote
3
down vote



accepted










It looks your I1 matrix is being used while wrapped in a MatrixForm. Otherwise, it works just fine.



1, 0, 1, -1.a, -b k, c l, a - b k - c l



a, -b k, a - c l, -a + c l




MatrixForm[1, 0, 1, -1].a, -b k, c l, a - b k - c l


enter image description here



That being said, one could also have



MatrixForm[1, 0, 1, -1][[1]].a, -b k, c l, a - b k - c l



a, -b k, a - c l, -a + c l







share|improve this answer






















  • Oh shoot. I did "wrap" it in MatrixForm. I thought MatrixForm was just a formatting command. I didn't think it did anything to my matrices. Thank you for your reply. That was it.
    – frequencydrive
    Sep 30 at 23:23






  • 2




    @frequencydrive If you find the answer useful, please consider accepting it as an answer.
    – Johu
    Sep 30 at 23:29










  • Related: mathematica.stackexchange.com/questions/166709
    – John Doty
    Sep 30 at 23:47

















1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
3
down vote



accepted










It looks your I1 matrix is being used while wrapped in a MatrixForm. Otherwise, it works just fine.



1, 0, 1, -1.a, -b k, c l, a - b k - c l



a, -b k, a - c l, -a + c l




MatrixForm[1, 0, 1, -1].a, -b k, c l, a - b k - c l


enter image description here



That being said, one could also have



MatrixForm[1, 0, 1, -1][[1]].a, -b k, c l, a - b k - c l



a, -b k, a - c l, -a + c l







share|improve this answer






















  • Oh shoot. I did "wrap" it in MatrixForm. I thought MatrixForm was just a formatting command. I didn't think it did anything to my matrices. Thank you for your reply. That was it.
    – frequencydrive
    Sep 30 at 23:23






  • 2




    @frequencydrive If you find the answer useful, please consider accepting it as an answer.
    – Johu
    Sep 30 at 23:29










  • Related: mathematica.stackexchange.com/questions/166709
    – John Doty
    Sep 30 at 23:47














up vote
3
down vote



accepted










It looks your I1 matrix is being used while wrapped in a MatrixForm. Otherwise, it works just fine.



1, 0, 1, -1.a, -b k, c l, a - b k - c l



a, -b k, a - c l, -a + c l




MatrixForm[1, 0, 1, -1].a, -b k, c l, a - b k - c l


enter image description here



That being said, one could also have



MatrixForm[1, 0, 1, -1][[1]].a, -b k, c l, a - b k - c l



a, -b k, a - c l, -a + c l







share|improve this answer






















  • Oh shoot. I did "wrap" it in MatrixForm. I thought MatrixForm was just a formatting command. I didn't think it did anything to my matrices. Thank you for your reply. That was it.
    – frequencydrive
    Sep 30 at 23:23






  • 2




    @frequencydrive If you find the answer useful, please consider accepting it as an answer.
    – Johu
    Sep 30 at 23:29










  • Related: mathematica.stackexchange.com/questions/166709
    – John Doty
    Sep 30 at 23:47












up vote
3
down vote



accepted







up vote
3
down vote



accepted






It looks your I1 matrix is being used while wrapped in a MatrixForm. Otherwise, it works just fine.



1, 0, 1, -1.a, -b k, c l, a - b k - c l



a, -b k, a - c l, -a + c l




MatrixForm[1, 0, 1, -1].a, -b k, c l, a - b k - c l


enter image description here



That being said, one could also have



MatrixForm[1, 0, 1, -1][[1]].a, -b k, c l, a - b k - c l



a, -b k, a - c l, -a + c l







share|improve this answer














It looks your I1 matrix is being used while wrapped in a MatrixForm. Otherwise, it works just fine.



1, 0, 1, -1.a, -b k, c l, a - b k - c l



a, -b k, a - c l, -a + c l




MatrixForm[1, 0, 1, -1].a, -b k, c l, a - b k - c l


enter image description here



That being said, one could also have



MatrixForm[1, 0, 1, -1][[1]].a, -b k, c l, a - b k - c l



a, -b k, a - c l, -a + c l








share|improve this answer














share|improve this answer



share|improve this answer








edited Sep 30 at 23:32

























answered Sep 30 at 23:00









That Gravity Guy

1,436513




1,436513











  • Oh shoot. I did "wrap" it in MatrixForm. I thought MatrixForm was just a formatting command. I didn't think it did anything to my matrices. Thank you for your reply. That was it.
    – frequencydrive
    Sep 30 at 23:23






  • 2




    @frequencydrive If you find the answer useful, please consider accepting it as an answer.
    – Johu
    Sep 30 at 23:29










  • Related: mathematica.stackexchange.com/questions/166709
    – John Doty
    Sep 30 at 23:47
















  • Oh shoot. I did "wrap" it in MatrixForm. I thought MatrixForm was just a formatting command. I didn't think it did anything to my matrices. Thank you for your reply. That was it.
    – frequencydrive
    Sep 30 at 23:23






  • 2




    @frequencydrive If you find the answer useful, please consider accepting it as an answer.
    – Johu
    Sep 30 at 23:29










  • Related: mathematica.stackexchange.com/questions/166709
    – John Doty
    Sep 30 at 23:47















Oh shoot. I did "wrap" it in MatrixForm. I thought MatrixForm was just a formatting command. I didn't think it did anything to my matrices. Thank you for your reply. That was it.
– frequencydrive
Sep 30 at 23:23




Oh shoot. I did "wrap" it in MatrixForm. I thought MatrixForm was just a formatting command. I didn't think it did anything to my matrices. Thank you for your reply. That was it.
– frequencydrive
Sep 30 at 23:23




2




2




@frequencydrive If you find the answer useful, please consider accepting it as an answer.
– Johu
Sep 30 at 23:29




@frequencydrive If you find the answer useful, please consider accepting it as an answer.
– Johu
Sep 30 at 23:29












Related: mathematica.stackexchange.com/questions/166709
– John Doty
Sep 30 at 23:47




Related: mathematica.stackexchange.com/questions/166709
– John Doty
Sep 30 at 23:47


Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?