Teach you how to use Execel to calculate the multiplication of two matrices

Source: Internet
Author: User

There are many functions in Excel that perform linear algebra operations, and all calculations are extremely easy with just a few clicks. But using these functions is still a bit trick, and today we're going to show you how to do the multiplication of two matrices in Excel.

Suppose we now have such a two matrix


Note the knowledge based on linear algebra:

(1) matrix AXB and BXA are different;

(2) Second, if the size of matrix A is MXN, the size of matrix B must be nxk, then the AXB calculation can be performed, and the size of the resulting matrix should be mxk, where the values of M and K can be equal or unequal.

So here we first enter the two matrices in Excel, as shown in, where Blue is matrix A, yellow is matrix B, and then we select a 2x2 area as the area used to display the results.

Then, notice that we need to press the F2 key to start the formula edit so that the 2x2 area can show the final element of the computed matrix. The formula that we need to calculate the matrix at this point is mmult.


You can then use a number of times to select the area where matrix A is located (that is, the blue part of the diagram), and then select the area where the Matrix B is located (the yellow part of the figure), as shown below


Finally, press Ctrl + Shift + Enter at the same time and you're done!



Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Teach you how to use Execel to calculate the multiplication of two matrices

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.