Mathematica Question (Matrix Multiplication)

AI Thread Summary
The user is attempting to compute a product of matrices in Mathematica, specifically using the notation for matrix multiplication rather than element-wise multiplication. They initially encountered issues with Mathematica interpreting the product command incorrectly. After some exploration, they discovered that using a Do[] command allows for proper matrix multiplication. The conversation highlights that while the product command is not suitable for this purpose, the MatrixPower function can be a useful alternative. The discussion concludes with the user expressing gratitude for the solution.
jeffreydk
Messages
133
Reaction score
0
I am trying to compute the following,

\prod_{j=0}^{N-1}\left[\hat{I}+\hat{M(j)}\left(\frac{T}{N}\right)\right]

where \hat{I}, \hat{M(j)} are matrices. My problem is that Mathematica interprets this product as element-wise with respect to the matrices, but I of course want it to use matrix multiplication. Is there any simple way to do this or do I need to write a code using some kind of do-loop?

Thanks for any help, I appreciate it.
 
Mathematics news on Phys.org
Use a . to multiply matrices: A.B
 
I figured it out now using a Do[] command, but my point was that if you want to multiply many matrices and not write out the long stretch of A1.A2.A3.A4...AN, then you cannot use the product command on Mathematica because that will just multiply the matrices element-wise. I wanted to know if there was any way of using the product command for a dot product.
 
The command MatrixPower[m,n] is what you're looking for!
 
Ahh, thank you very much.
 
Thread 'Video on imaginary numbers and some queries'
Hi, I was watching the following video. I found some points confusing. Could you please help me to understand the gaps? Thanks, in advance! Question 1: Around 4:22, the video says the following. So for those mathematicians, negative numbers didn't exist. You could subtract, that is find the difference between two positive quantities, but you couldn't have a negative answer or negative coefficients. Mathematicians were so averse to negative numbers that there was no single quadratic...
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Thread 'Unit Circle Double Angle Derivations'
Here I made a terrible mistake of assuming this to be an equilateral triangle and set 2sinx=1 => x=pi/6. Although this did derive the double angle formulas it also led into a terrible mess trying to find all the combinations of sides. I must have been tired and just assumed 6x=180 and 2sinx=1. By that time, I was so mindset that I nearly scolded a person for even saying 90-x. I wonder if this is a case of biased observation that seeks to dis credit me like Jesus of Nazareth since in reality...
Back
Top