<< Chapter < Page
  Matrices   Page 1 / 1
Chapter >> Page >
This module covers multiplication of matrices.

Multiplying a row matrix by a column matrix

A “row matrix” means a matrix with only one row. A “column matrix” means a matrix with only one column. When a row matrix has the same number of elements as a column matrix, they can be multiplied. So the following is a perfectly legal matrix multiplication problem:

1 2 3 4 size 12{ left [ matrix { 1 {} # 2 {} # 3 {} # 4{}} right ]} {} x [ 10 20 30 40 ]

These two matrices could not be added, of course, since their dimensions are different, but they can be multiplied. Here’s how you do it. You multiply the first (left-most) item in the row, by the first (top) item in the column. Then you do the same for the second items, and the third items, and so on. Finally, you add all these products to produce the final number.

A picture illustrating how to multiply a matrix. In this example a 1x4 matrix is multiplied by a 4x1 matrix.

A couple of my students (Nakisa Asefnia and Laura Parks) came up with an ingenious trick for visualizing this process. Think of the row as a dump truck, backing up to the column dumpster. When the row dumps its load, the numbers line up with the corresponding numbers in the column, like so:

A picture illustrating how to multiply a matrix. In this example a 1x4 matrix is multiplied by a 4x1 matrix.

So, without the trucks and dumpsters, we express the result—a row matrix, times a column matrix—like this:

[ 1 2 3 4 ] [ 10 20 30 40 ] = [ 300 ]

There are several subtleties to note about this operation.

  • The picture is a bit deceptive, because it might appear that you are multiplying two columns. In fact, you cannot multiply a column matrix by a column matrix . We are multiplying a row matrix by a column matrix. The picture of the row matrix “dumping down” only demonstrates which numbers to multiply.
  • The answer to this problem is not a number: it is a 1-by-1 matrix.
  • The multiplication can only be performed if the number of elements in each matrix is the same. (In this example, each matrix has 4 elements.)
  • Order matters! We are multiplying a row matrix times a column matrix , not the other way around.

It’s important to practice a few of these, and get the hang of it, before you move on.

Multiplying matrices in general

The general algorithm for multiplying matrices is built on the row-times-column operation discussed above. Consider the following example:

1 2 3 4 5 6 7 8 9 10 11 12 size 12{ left [ matrix { 1 {} # 2 {} # 3 {} ##4 {} # 5 {} # 6 {} ## 7 {} # 8 {} # 9 {} ##"10" {} # "11" {} # "12"{} } right ]} {} 10 40 20 50 30 60 size 12{ left [ matrix { "10" {} # "40" {} ##"20" {} # "50" {} ## "30" {} # "60"{}} right ]} {}

The key to such a problem is to think of the first matrix as a list of rows (in this case, 4 rows), and the second matrix as a list of columns (in this case, 2 columns). You are going to multiply each row in the first matrix, by each column in the second matrix. In each case, you will use the “dump truck” method illustrated above.

Start at the beginning: first row, times first column.

A picture showing the first step in multiplying matrices.

Now, move down to the next row. As you do so, move down in the answer matrix as well.

A picture showing the second step in multiplying matrices.

Now, move down the rows in the first matrix, multiplying each one by that same column on the right. List the numbers below each other.

A picture showing the following steps in multiplying matrices.

The first column of the second matrix has become the first column of the answer. We now move on to the second column and repeat the entire process, starting with the first row.

A picture showing the following steps in multiplying matrices for the second row.

And so on, working our way once again through all the rows in the first matrix.

A picture showing the first step in multiplying matrices.

We’re done. We can summarize the results of this entire operation as follows:

1 2 3 4 5 6 7 8 9 10 11 12 size 12{ left [ matrix { 1 {} # 2 {} # 3 {} ##4 {} # 5 {} # 6 {} ## 7 {} # 8 {} # 9 {} ##"10" {} # "11" {} # "12"{} } right ]} {} 10 40 20 50 30 60 size 12{ left [ matrix { "10" {} # "40" {} ##"20" {} # "50" {} ## "30" {} # "60"{}} right ]} {} = 140 320 320 770 500 1220 680 1670 size 12{ left [ matrix { "140" {} # "320" {} ##"320" {} # "770" {} ## "500" {} # "1220" {} ##"680" {} # "1670"{} } right ]} {}

It’s a strange and ugly process—but everything we’re going to do in the rest of this unit builds on this, so it’s vital to be comfortable with this process. The only way to become comfortable with this process is to do it. A lot. Multiply a lot of matrices until you are confident in the steps.

Note that we could add more rows to the first matrix, and that would add more rows to the answer. We could add more columns to the second matrix, and that would add more columns to the answer. However—if we added a column to the first matrix, or added a row to the second matrix, we would have an illegal multiplication. As an example, consider what happens if we try to do this multiplication in reverse:

10 40 20 50 30 60 size 12{ left [ matrix { "10" {} # "40" {} ##"20" {} # "50" {} ## "30" {} # "60"{}} right ]} {} 1 2 3 4 5 6 7 8 9 10 11 12 size 12{ left [ matrix { 1 {} # 2 {} # 3 {} ##4 {} # 5 {} # 6 {} ## 7 {} # 8 {} # 9 {} ##"10" {} # "11" {} # "12"{} } right ]} {} Illegal multiplication

If we attempt to multiply these two matrices, we start (as always) with the first row of the first matrix, times the first column of the second matrix: [ 10 40 ] 1 4 7 10 size 12{ left [ matrix { 1 {} ##4 {} ## 7 {} ##"10" } right ]} {} . But this is an illegal multiplication; the items don’t line up, since there are two elements in the row and four in the column. So you cannot multiply these two matrices.

This example illustrates two vital properties of matrix multiplication.

  • The number of columns in the first matrix, and the number of rows in the second matrix, must be equal. Otherwise, you cannot perform the multiplication.
  • Matrix multiplication is not commutative —which is a fancy way of saying, order matters. If you reverse the order of a matrix multiplication, you may get a different answer, or you may (as in this case) get no answer at all.

Questions & Answers

What is inflation
Bright Reply
a general and ongoing rise in the level of prices in an economy
AI-Robot
What are the factors that affect demand for a commodity
Florence Reply
price
Kenu
differentiate between demand and supply giving examples
Lambiv Reply
differentiated between demand and supply using examples
Lambiv
what is labour ?
Lambiv
how will I do?
Venny Reply
how is the graph works?I don't fully understand
Rezat Reply
information
Eliyee
devaluation
Eliyee
t
WARKISA
hi guys good evening to all
Lambiv
multiple choice question
Aster Reply
appreciation
Eliyee
explain perfect market
Lindiwe Reply
In economics, a perfect market refers to a theoretical construct where all participants have perfect information, goods are homogenous, there are no barriers to entry or exit, and prices are determined solely by supply and demand. It's an idealized model used for analysis,
Ezea
What is ceteris paribus?
Shukri Reply
other things being equal
AI-Robot
When MP₁ becomes negative, TP start to decline. Extuples Suppose that the short-run production function of certain cut-flower firm is given by: Q=4KL-0.6K2 - 0.112 • Where is quantity of cut flower produced, I is labour input and K is fixed capital input (K-5). Determine the average product of lab
Kelo
Extuples Suppose that the short-run production function of certain cut-flower firm is given by: Q=4KL-0.6K2 - 0.112 • Where is quantity of cut flower produced, I is labour input and K is fixed capital input (K-5). Determine the average product of labour (APL) and marginal product of labour (MPL)
Kelo
yes,thank you
Shukri
Can I ask you other question?
Shukri
what is monopoly mean?
Habtamu Reply
What is different between quantity demand and demand?
Shukri Reply
Quantity demanded refers to the specific amount of a good or service that consumers are willing and able to purchase at a give price and within a specific time period. Demand, on the other hand, is a broader concept that encompasses the entire relationship between price and quantity demanded
Ezea
ok
Shukri
how do you save a country economic situation when it's falling apart
Lilia Reply
what is the difference between economic growth and development
Fiker Reply
Economic growth as an increase in the production and consumption of goods and services within an economy.but Economic development as a broader concept that encompasses not only economic growth but also social & human well being.
Shukri
production function means
Jabir
What do you think is more important to focus on when considering inequality ?
Abdisa Reply
any question about economics?
Awais Reply
sir...I just want to ask one question... Define the term contract curve? if you are free please help me to find this answer 🙏
Asui
it is a curve that we get after connecting the pareto optimal combinations of two consumers after their mutually beneficial trade offs
Awais
thank you so much 👍 sir
Asui
In economics, the contract curve refers to the set of points in an Edgeworth box diagram where both parties involved in a trade cannot be made better off without making one of them worse off. It represents the Pareto efficient allocations of goods between two individuals or entities, where neither p
Cornelius
In economics, the contract curve refers to the set of points in an Edgeworth box diagram where both parties involved in a trade cannot be made better off without making one of them worse off. It represents the Pareto efficient allocations of goods between two individuals or entities,
Cornelius
Suppose a consumer consuming two commodities X and Y has The following utility function u=X0.4 Y0.6. If the price of the X and Y are 2 and 3 respectively and income Constraint is birr 50. A,Calculate quantities of x and y which maximize utility. B,Calculate value of Lagrange multiplier. C,Calculate quantities of X and Y consumed with a given price. D,alculate optimum level of output .
Feyisa Reply
Answer
Feyisa
c
Jabir
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Matrices. OpenStax CNX. Mar 31, 2011 Download for free at http://cnx.org/content/col11288/1.2
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Matrices' conversation and receive update notifications?

Ask