Use MATLAB to generate random 4× 4 matrices A=rand(4) and B=rand(4).
For each of the following, compute A1, A2, A3, and A4 as indicated and determine which of the matrices are equal
(you can use MATLAB to test whether two matrices are equal by computing their difference):
-
A1=A*B, A2=B*A, A3=(A′*B′)′, A4=(B′*A′)′
- A1=A′*B′, A2=(A*B)′, A3=B′*A′, A4=(B*A)′
- A1=inv(A*B), A2=inv(A)*inv(B), A3=inv(B*A), A4=inv(B)*inv(A)
- A1=(inv((A*B)′), A2=inv(A′*B′), A3=inv(A′)*inv(B′),
A4=(inv(A)*inv(B))′
A simple application of matrix calculus
Car owners occasionally trade in their used car for a new car and
marketing people are interested in the following type of question:
Assume that you own a Citroen. Will your next car be another Citroen or
a Volkswagen? Customers’ choices eventually determine the market share
of different brands. Car dealers need estimates of how the market share
of their brand (or brands) will change as a function of time. The
problem can be dealt with by matrix algebra, and ends up being an
exercise in matrix multiplication.
Let the index i, 1≤ i ≤ n denote car brands, in alphabetic
order. That is, 1 is Alfa Romeo, 2 is Aston Martin, 3 is Bentley,
and n is Toyota. Let also t=1,2, … denote time, measured in
years from an arbitrary initial time, and let Fj(t) be the fraction
of cars of type j traded in year t. Assume for simplicity that car
owners trade their cars in every year1 and let
Cij the fraction of cars of brand j which are traded in for a new
car of brand i.
As an example you will use the following data from Table 1 and
2 that are also available in electronic form this
xls
file or this
txt
file2. (We limit ourselves to n=5 because
the matrices we then need are easily visualized on a screen, there are
of course more car brands). The data refer to the absolute numbers,
divided by 1000, from which fractions can be derived. We will assume
that the distribution of the next outcome depends only on the previous
outcome and that the trading fractions are constant over time.
Volkswagen | Fiat | Ford | Peugeot | Toyota |
|
426 | 436 | 364 | 437 | 336 |
Table 1: Cars traded at time 0 for each car brand. |
| current car (j) |
|
|
new car (i) | Volkswagen | Fiat | Ford | Peugeot | Toyota |
|
Volkswagen | 335 | 717 | 586 | 340 | 104 |
Fiat | 375 | 257 | 409 | 551 | 626 |
Ford | 491 | 43 | 614 | 292 | 445 |
Peugeot | 246 | 383 | 373 | 567 | 649 |
Toyota | 554 | 600 | 18 | 250 | 177 |
|
Table 2: Cars traded from a brand to another. |