Application to Store Inventory. A typical department store will have about 10,000 different items each with a different price per item. The problem is to determine the net worth of the store's inventory. Clearly, we must sum 10,000 numbers where each number is a product of the number of each item and the price of this item. With 10,000 products in the store all this data must be organized in a systematic way. For example, suppose the store has just four types of TVs:
27" TV for $400
31" TV for $900
50" TV for $2100.
P =
.
Associated with this order is and inventory column vector
I =
where
7 is the number of 27" TVs, 12 is the number of 27" TVs, 3 is the number of 31" TVs and
2 is the number of 50" TVs. The net worth is given in the following form
ITP = 7*100 + 12*400 + 3*900 + 2*2100.
The symbol IT is a row vector associated with the column vector I and is called the transpose of I
IT = [7 12 3 2].
This product is called a row vector times a column vector or dotproduct of two column vectors. Here the net worth is the dotproduct of the inventory vector and the price vector.
The general scheme for n different types of items with item k having price p(k) and i(k) number of item k is as follows:
ITP = i(1)*p(1) + i(2)*p(2) +... + i(n)*p(n) where
I = [i(1) i(2) ... i(n)]T and P = [p(1) p(2) ... p(n)]T are n dimensional column vectors. This product has n multiplications and n-1 additions, and we say it has order n operations. Another order n operation is multiplication of a column vector by a constant. For example, if the above TV store were to triple its inventory, then the new inventory vector would be
3IT = [21 36 9 6].
Matrix operations which have order n operations are classified as BLAS1 which signifies basic linear algebra subroutine of order n to the first power operations. Most computers have BLAS1 subroutines which have been optimized for the best possible performance on that computer.
Application to Investment. An investor has some portions in stocks, bonds, growth stocks and money market. Each year she decides how to reallocate her investments. From past year's reallocations we have
.4 probability of investing in stock if already invested in bond,
.4 probability of investing in stock if already invested in growth,
.5 probability of investing in stock if already invested in money.
P1T = [.8 .4 .4 .5].
If the current investments are
40% bond
7% growth
3% money,
P1TC = .8*.5 + .4*.4 + .4*.07 + .5*.03
to be the fraction to be invested in stock the next year.
Associated with each investment category is a probability vector
PiT= [p(i,1) p(i,2) p(i,3) p(i,4)] where
p(i,j) is the probability of investing in category i if already invested in category j. Hence, according to the above ordering p(2,4) is the probability of investing in bonds if already invested in growth.
PiTC = the fraction to be invested in category i given the current investments C. We can record this in vector format as
newC = [P1TC P2TC P3TC P4TC]T.
Another way to say the is that the component i of the new investment vector is equal to the dotproduct of the probability vector i and the old investment vector, C.
The probability vectors can be formed into a 4 by 4 matrix or array
P =
.
The newC can be viewed as a product of the matrix P and the column vector C where component i of the newC is defined as the product of row i of P times column vector C.
One can repeat this from one year to the next to try to predict future patterns of investment. For example, after two years the prediction will have the form P(PC), after three years P(P(PC) and so forth. We will later examine the behavior of this sequence of investment vectors. This is an example of a Markov chain where P is called a transition matrix from one state to the next state. Each column of P has non negative component whose sum equals one.
Return to Section TOC
Return to the Previous Subsection
Go to Next Subsection