Exam 2
Question 1 (8 points). Given the matrices A and B below, compute 2A+B
7 2 2 T
A= |5 1] ,B={-3 5
2 1 -2 3
ANSWER: Since A and B have the same number of rows and columns, we can easily
compute this by adding the corresponding entries to each other, leading to the following:
1 1 2 1 16 5
2A4+4RB=010 R} +{-3 K}=017 13
1 8 -2 3 2 11
Let's walk it straight through. Quick takeaway |
e Scalar multiplication — multiply every entry
Given:
e Matrix addition — add entry-by-entry
72 2 1 ¢ Same dimensions — you're good to go
5 4], B=]1-3 5 . . . S
2 4 If you want, | can give you a few practice problems like this so it sticks.
Step 1: Compute 2A
Multiply every entry in A by 2:
Step 2: Add 2A + B
Add corresponding entries:
e Row1(14+2,4+1) = (16, 5)
e Row2 (10 + (-3), 8+5) = (7, 13)
e Row3:(4+(-2), 8+3) = (2, 11)
Final Answer:
16 5
2A+B=|T7 13
2 11
, ~ r N\ A 4
Question 2 (10 points). Given the matrices A and B below, consider the products AB and
BA. State clearly which are defined and which are not defined, then compute any products
]
that are defined:
15 3
A"(z 1 2)'B=(
Since A is 2x3 and B is 2x2, the product AB is NO'I' defined since it's a (2x3) times a
(2x2), but the product BA is defined because it's a (2x2) times a (2x3). The product is
computed below:
2 ‘Ivi%t B 3 2+ 1+ 322 2x54+3%1 2434342\ (14 22 12
-
-1 1)\2 4 2] \-1+4+1+2 ~1+5641+41 ~1#34+1e2) " \-2 ~1 -1
Alright—this is a classic “do the dimensions even work?" problem. Don't skip that check. It's where most
Step 2: Compute BA
people slip.
2 3\/4 5 3
BA:(—1 1) (2 4 2)
Given:
Row-by-column:
First row:
e 2-44+3-2=8+6=14
e 2.5+43-4=10+12=22
e 2-3+43-2=6+6=12
Second row:
Step 1: Check which products are defined e —1-4+41-2=-4+4+2=-2
e —1-5+41-4=-5+4=-1
©® AB:
e —-1-341-2=-3+2=-1
o Ais2x3
e Bis2x2
Inner dimensions: 3 # 2 - X NOT defined
Final Answer:
e AB: X Not defined
e BA:
¢ BA:
e Bis2x2 14 22 12
o Ais2x3 -2 -1 -1
Inner dimensions: 2 = 2 - [ Defined
Result willbe 2 x 3 Straight talk *
e Matrix multiplication is not commutative — order matters.
e Always check dimensions first. Saves time and avoids nonsense work.
e Think: inside numbers must match (columns of first = rows of second)
Question 1 (8 points). Given the matrices A and B below, compute 2A+B
7 2 2 T
A= |5 1] ,B={-3 5
2 1 -2 3
ANSWER: Since A and B have the same number of rows and columns, we can easily
compute this by adding the corresponding entries to each other, leading to the following:
1 1 2 1 16 5
2A4+4RB=010 R} +{-3 K}=017 13
1 8 -2 3 2 11
Let's walk it straight through. Quick takeaway |
e Scalar multiplication — multiply every entry
Given:
e Matrix addition — add entry-by-entry
72 2 1 ¢ Same dimensions — you're good to go
5 4], B=]1-3 5 . . . S
2 4 If you want, | can give you a few practice problems like this so it sticks.
Step 1: Compute 2A
Multiply every entry in A by 2:
Step 2: Add 2A + B
Add corresponding entries:
e Row1(14+2,4+1) = (16, 5)
e Row2 (10 + (-3), 8+5) = (7, 13)
e Row3:(4+(-2), 8+3) = (2, 11)
Final Answer:
16 5
2A+B=|T7 13
2 11
, ~ r N\ A 4
Question 2 (10 points). Given the matrices A and B below, consider the products AB and
BA. State clearly which are defined and which are not defined, then compute any products
]
that are defined:
15 3
A"(z 1 2)'B=(
Since A is 2x3 and B is 2x2, the product AB is NO'I' defined since it's a (2x3) times a
(2x2), but the product BA is defined because it's a (2x2) times a (2x3). The product is
computed below:
2 ‘Ivi%t B 3 2+ 1+ 322 2x54+3%1 2434342\ (14 22 12
-
-1 1)\2 4 2] \-1+4+1+2 ~1+5641+41 ~1#34+1e2) " \-2 ~1 -1
Alright—this is a classic “do the dimensions even work?" problem. Don't skip that check. It's where most
Step 2: Compute BA
people slip.
2 3\/4 5 3
BA:(—1 1) (2 4 2)
Given:
Row-by-column:
First row:
e 2-44+3-2=8+6=14
e 2.5+43-4=10+12=22
e 2-3+43-2=6+6=12
Second row:
Step 1: Check which products are defined e —1-4+41-2=-4+4+2=-2
e —1-5+41-4=-5+4=-1
©® AB:
e —-1-341-2=-3+2=-1
o Ais2x3
e Bis2x2
Inner dimensions: 3 # 2 - X NOT defined
Final Answer:
e AB: X Not defined
e BA:
¢ BA:
e Bis2x2 14 22 12
o Ais2x3 -2 -1 -1
Inner dimensions: 2 = 2 - [ Defined
Result willbe 2 x 3 Straight talk *
e Matrix multiplication is not commutative — order matters.
e Always check dimensions first. Saves time and avoids nonsense work.
e Think: inside numbers must match (columns of first = rows of second)