Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 14

Math C1 – Matrices and Vectors

1. Matrices

[Matrix = A number scheme written between rectangular brackets. The numbers in the matrix,
ordered horizontally in rows and vertically in columns, are called the entries of the matrix.]

 Aij = the number that we find in the i-th row and the j-th column of a matrix

o Transpose of a matrix: If A is a m x n matrix, then its transpose AT is a n x m matrix. It has


the number aji at the position (i, j).
o Zero matrix: A zero matrix is a matrix, usually indicated by the capital letter O, of which all
entries are equal to zero.
o Square matrix: A matrix containing an equal number of rows and columns is called a square
matrix.
o Diagonal entries: Entries 11, 22, 33, etc. Only square matrices have diagonal entries.
o Identity matrix: A square matrix of which all diagonal entries equal one and all non-diagonal
entries equal zero. Indicated by the letter I.

2. Vectors

[Vector = A matrix consisting of one column only, indicated by a lowercase letter]

 Dimension of a vector = The number of entries, which is the order of the vector

o Zero vector: A zero vector is a vector, usually indicated by 0, of which each entry is equal to
zero.
o Unit vector: A unit vector is a vector with one entry equal to 1, while all the other entries. The
unit vector of which the i-th entry equals 1 is indicated by ei.

3. Operations on vectors

o Scalar multiplication of a vector and a number: The product of a vector x and a number c is
the vector cx, which we obtain by multiplying each entry of x by c.
o Sum of vectors: The sum of two vectors x and y of the same dimension is the vector x + y,
which we obtain by taking the sum of each pair of corresponding entries of x and y. By taking
the difference of each pair of corresponding entries of x and y, we obtain the difference x-y of
the vectors x and y.
o Linear combination: 7t + 12r is a linear combination of vectors t and r.

4. Operations on matrices

o Sum of matrices: The sum of two matrices A and B of the same order is the matrix A + B,
which we obtain by taking the sum of each pair of corresponding entries of the two matrices.
By taking the difference of each pair of corresponding entries of A and B, we obtain the
difference A-B of the matrices A and B. These operations are defined only for matrices of the
same order.
o Scalar multiplication of a matrix and a number: The product of a matrix A and a number c is
the matrix cA, which we obtain by multiplying each entry of the matrix A by c.
5. The product of a Matrix and a Vector

[The product of an m x n matrix A and a vector x of dimension n is defined as the vector Ax, of which
the i-th entry equals the product of the i-th row of A and vector x. This latter product results from
multiplying the entries of the row by the corresponding entries of the vector and then taking the sum
of these products. The vector Ax has dimension m.]

 The dimension of vector x must equal the number of columns of matrix A, whereas the dimension
of vector Ax equals the number of rows of matrix A.
 m x n * n x 1  n * n the same?  yes: result is m x 1

6. Properties of the matrix-vector product

 A(x+y) = Ax + Ay
 A(cx) = cAx

7. The product of two matrices

[The product of a matrix A and a matrix B is the matrix AB, of which the entry at position (i, j) is the
product of the i-th row of A and the j-th column of B. The product of matrix AB can only be
determined if the number of columns of A equals the number of rows of B]

 Check if: m x k * k x n  k * k the same?  yes: result is m x n

o Power of a matrix: For a square matrix A we write A2 and for AAA A3, etc.

8. Properties of the matrixproduct

 AI = IA = A
 (AB)T = BTAT

EXTRA NOTES
Math C2 – Systems of linear equation
1. Systems of linear equation

[System of linear equation = A m x n system of linear equations is a system consisting of m linear


equations in n variables]

 aij denotes the coefficient of variable xj in the i-th equation.


 A system of linear equations is said to be in the standard form, when the system is rearranged in
such that all terms containing a variable are on the left-hand side in the same order, and the constant
terms are on the right-hand side.

2. Linear systems as vector equations

o Coefficient matrix: We call a matrix, in which we collect the coefficients of the system, the
coefficient matrix of the system.
o Vector of constants: We call a vector, in which we collect the constant terms of the system,
the vector of constants of the system.
o Augmented coefficient matrix: If we add the vector of constants as final column to the
coefficient matrix, we get the so-called augmented coefficient matrix, which is written as [A|
b].
o Vector equation: Every m x n system of linear equations (in standard form) can be written as
Ax = b, where A is the coefficient matrix of the system, x is the vector of unknowns, and b is
the vector of constants.

[(In)consistent systems and the number of solutions =


If a system has no solutions, then the systems is called inconsistent.
If a system has at least one solution, then the system is called consistent.
A consistent system has either precisely one solution, or infinitely many solutions. If it has precisely
one solution, then it is called uniquely solvable]

3. Solving a system of linear equations

 Linear system with a unique solution:


o Elementary operations:
1: multiplying or dividing an equation by a nonzero number
2: interchanging (the positions of) equations
3: adding or subtracting a multiple of one equation to or from another equation
o Gaussian elimination: A process during which we use these operations to find the solution of
a system of linear equations
o Reduced matrix:
1: the left-most non-zero entry in each row is 1
2: every column containing a leading one has zeros elsewhere
3: every leading one is to the right of the leading one in the row above (if any)
o Zero row: A row with only zeroes in a matrix, corresponds with the equation: 0x+oy=0. As
this equation is satisfied for all values of x and y, it is called a redundant equation. Such rows
are always put at the lowest position of the reduced matrix.
 Linear system with an infinite number of solutions:
o Leading variable: Variable that corresponds with a column containing a leading one (ie. P)
o Free variable: Variable that is nonleading (ie. 0.2Y)
o Reduced form: Solving a system for the leading variables in terms of the free variables (ie.
Q= 3 + 0.2Y)  After you have the reduced form, you can determine the values of the
leading variables  Fill in 0 for the free variables and solve for the leading variables  Can
you solve it for all possible values for the free variables?  Yes = infinitely many solutions.
o Endogenous variable: The endogenous variables of an economic model should coincide with
the leading variables of the system, because the values of the leading variables are explained
by the model. Will be placed before the exogenous variables.
o Exogenous variable: The exogenous variables should coincide with the free variables,
because the values of the free variables are determined outside the model. Will be placed after
the endogenous variables.

 Inconsistent linear systems:


[Consistency of a system = A system of linear equations is consistent if and only in the system’s
reduced augmented coefficient matrix contains NO row of the form [ 0 … 0 | a ], where a ISN’T equal
to zero. A consistent system of equations has a unique solution of there are NO free variables, and
infinitely many solutions of there are free variables]

EXTRA NOTES
Math C3 – The Inverse Matrix
1. Invertible matrices

[Inverse matrix = A matrix A-1 is called the inverse matrix of the square matrix A if A-1A = AA-1 = I. A
matrix is called invertible if it has an inverse]

 In order to prove that a square matrix A is invertible, it is sufficient to find a matrix C such that CA
= I or AC = 1. In both cases this matrix C is the inverse of A

 If the square matrix A is invertible, then the system Ax=b has a unique solution, which is given by
x=A-1b for all choices of b. If A is not invertible, then the system has either infinitely many solutions
or no solution.

2. Finding the inverse of a matrix

 By reducing the matrix [ A | I ], we find the inverse of A, or we come to the conclusion that A is
not invertible. If the matrix is invertible, the reduction process leads to [ I | A-1 ].

3. The determinant

[The determinant = a number calculated from the entries of the matrix, that if it is not equal to 0
proves that the matrix is invertible, while if it is equal to 0 proves that the matrix has no inverse]

 A B Det = AD – BC
C D

 Submatrix: The submatrix corresponding with the entry aij of the square matrix A, is the matrix
Aij which is obtained by removing A from the i-th row and the j-th column.

 The determinant of an n x n matrix can be found as the sum det A = a11 x det A11 – a12 x det A12
+ a1n x det A1n. Apart from the sign, each term in this sum is the product of an entry of the first row
of A and the determinant of the corresponding submatrix. The signs of the terms are alternately plus
and minus, beginning with plus. We say that we have evaluated the determinant by expansion along
the first row.

 Rules:
o If we interchange two rows in a matrix, then its determinant changes sign.
o The determinant of a matrix equals the determinant of its transpose.
o WARNING: For two square matrices A and B of the same order, det (A + B) is generally not
equal to det A + det B.
o For two square matrices A and B of the same order, it holds that det AB = det A x det B
o For a square n x n matrix A we have det(cA) = c^n x detA
o For an invertible matrix C, 1 = det I = det CC^-1 = det C x det C^-1, so det C^-1 = 1 / det C
EXTRA NOTES
Math C4 – Financial Mathematics
1. Future and present value: single deposits or receipts

 Future value of a single amount = If the interest rate is r per year, an amount K that is available
now has after t years a future value of K x (1 + r)^t]
 Exponential growth occurs when an amount is multiplied by a constant factor per time unit, say
factor g, such an exponential growth process can be described by means of the sequence of numbers a,
a x g, a x g^2, etc. The sequence is called a geometric sequence with first term a and growth factor g..
 Present value of a single amount = If the interest rate is r per year, an amount F that is (or should
be) available t years from now has a present value of F x (1+r)^-t

2. Future and present value: Periodic deposits or receipts

 The sum of a finite number of terms of a geometric sequence: The sum Sn of the first n terms of a
geometric sequence with first term a and growth factor g is given by Sn = a x ((g^n – 1)/(g-1))
equivalently Sn = a x ((1-g^n)/(1-g)) , with the basic expression most useful when g > 1 and the
equivalent version most useful when g<1.
 The future value of periodic amounts: The future value of an annuity of A per year, for t years in
succession, with an interest rate of r per year, and each deposit at the end of the year equals:
A/r x ((1+r)^t-1)
 The present value of periodic amounts: The present value of an annuity of A per year, for t years in
succession, with an interest rate of r per year, and each payment at the end of the year equals:
A/r x (1-(1/(1+r)^t))

3. Some other topics in financial mathematics

 The annuity mortgage: At the end of each year, a constant amount A must be paid at the bank.
Such a mortgage is called an annuity mortgage. The constant annual amount A consists of an interest
part and a repayment part. As time proceeds, an increasing part of the mortgage is paid off, so that the
interest due on the remaining debt goes down. The interest part for A gets smaller over time, while the
repayment part gets larger.
 Determine A:
Present value = A/r x (1-(1/(1+r)^t)
 Suppose that a loan of K is repaid as annuity. If the amount should be paid off in t years,
the interest rate is r per year and each payment is made at the end of the year, then the annuity
A follows as rK / 1-(1+r)^-t

 Net present value and the internal rate of return: For a project with an initial investment cost of A0
and returns of A1, … An in the successive years, the internal rate of return is a rate r such that the
project’s net present value (-A0 + A1/1+r + A2/(1+r)^2 + etc. equals zero
 For any interest rate smaller that the IRR, the project’s net present value would be positive
and so the project would be profitable.
 A project is profitable if its net present value is positive and/or its prevailing interest rate is
smaller than the IRR.

 Models with an infinite horizon: The sum of an infinite geometric sequence with first term a and
growth factor g is given by S = a / 1-g. The sum is only defined when 0 < g < 1.

 Interest periods and effective interest rates:


 Effective interest rate: If the annual interest rate is r and interest is compounded n times a year
(equally spread over the year) at the rate of r/n per period, then after one year an amount K will have
increased to K x (1+ r/n)^n. This corresponds with an annual growth factor of (1 + r/n)^n, and an
effective yearly interest rate of (1 + r/n)^n -1.
 For a given annual interest rate, the effective yearly interest rate increases if the number of
periodic interest payments increases.
 As the number of periods n tends to infinity, the effective yearly interest rate approaches
e^0.06 = 0.0618365
 If the annual interest rate is r and interest is compounded n times a year (equally spread
over the year) at the rate of r/n per period, then after t years an amount K will have increased
to K x ( 1 + r/n ) ^nt.

EXTRA NOTES
Math LP C1 – The Basics of Linear Programming
1. Mathematical model

 Decisions are modeled as decision variables with a domain specified (e.g. two variables x>0 and
y>0)
 An objective function measures the quality of decisions by computing for each combination of
variables an objective function (e.g. 3x + 3y)
 Formulas model the constraints that restrict the possible combinations of values of decision
variables to feasible solutions (e.g. x + 2y < 2)
 An optimal solution is a feasible solution that has a maximal (or minimal) objective value among
the feasible solutions.

2. Case production planning

 The cement producer ENCI has to determine a production plan for two types of cement.
– Two products: Alpha and Beta.
– Different profits: 4 Euro per ton of Alpha, 3 Euro per ton of Beta.
– Up to 60,000 ton of Alpha, and 90,000 ton of Beta could be sold.
– Oven has capacity of 100 tons per hour, availability is 1,100 hours.
– Distribution department has capacity of 3,400 hours, can ship 20 tons of type Alpha,
and 50 tons of type Beta per hour.
 Decision variables:
– How much Alpha and Beta should be produced?
Variables A and B. Units? 1000 tons
 Objective: maximize profit!: 4000 A + 3000 B
 Constraints:
– Do not produce more of Alpha and Beta than can be sold: A ≤ 60, B ≤ 90
– Stay within the limit of the oven capacity: 10 A + 10 B ≤ 1100
– Do not exceed the capacity of the distribution department: 50 A + 20 B ≤ 3400
– Variables are nonnegative: A,B  0
 Constraints:
Maximise : 4,000A + 3,000B
Subject to: 10A + 10B ≤ 1,100 (1)
50A + 20B ≤ 3,400 (2)
A ≤ 60 (3)
B ≤ 90 (4)
A≥0 (5)
B≥0 (6)
 Terminology:
o The linear function defining a constraint is called left hand side (LHS), the bound on this
function is called right hand side (RHS).
o The combinations of A and B that satisfy all constraints are called feasible solutions, the set
of feasible solutions is called feasible region.
o The best feasible solution (maximizing the objective function) is called the optimal solution.
o Constraints (1) and (2) are resource capacity constraints. A resource can be any item needed
for production, of which only limited quantities are available. A resource capacity constraint
states that the amount of the resource that is used should be less than or equal to the amount
that is available.
o Constraints (3) and (4) are called demand constraints.
o Constraints (5) and (6) are called domain constraints.

 WATCH OUT:
o For the optimal solution some of the constraints will be binding, (satisfied at equality by the
optimal solution)  Constraints (1) and (2). Binding constraints have zero slack.
o Others will be non-binding, satisfied as inequalities  Constraints (3) and (4).
The difference between the optimal solution and maximum is called the slack.
o If a constraint does not cut off any additional points from the feasible region, we
call it redundant.
o Some LP models can have more than one optimal solution, a phenomenon
known as multiple optimal solutions. It can be that the final level curve intersects
the feasible region along an edge rather than a single corner point. In that case, all
the points on the same line segment produce the same optimal objective function.
o Sometimes the feasible region of a model is empty. In this case, there are no
values for the decision variables that satisfy all constraints at the same time. If the
problem has no feasible solutions, it does not have an optimal solution.
o Sometimes you will have constraints that do not look linear, you just have to use
algebraic manipulation to make it linear.

 Solving:

o As can be seen by the shaded region in figure 5 and 6, there is an infinite number of feasible
solutions to our problem, but it can be shown that if an LP problem has one or more optimal
solutions with a finite objective function value, then at least one of these optimal solutions
will occur at a point in the feasible region where two or more border lines of the constraints
intersect. The points of intersection are called corner points.
o The optimal solution of our problem occurs at the point where the highest possible level curve
just intersects the feasible region. This is at the intersection of the border lines of constraints
(1) and (2).

EXTRA NOTES
Math LP C2 – Sensitivity Analysis
1. Sensitivity analysis

[Sensitivity analysis = Sensitivity analysis measures what happens to an optimal solution and its
value, in case of small changes in single coefficients, including the objective coefficient (Cj), the RHS
coefficient (Bi) and the LHS coefficient (Aij)]

 We do sensitivity analysis, because all model coefficients are not known exactly. We perform
sensitivity analysis though the sensitivity report.

 The slope of the level curves is determined by (minus) the ratio of the A-coefficient to the B-
coefficient. If the A-coefficient gets larger or the B-coefficient smaller, then the level curves would
become steeper. If the A-coefficient gets smaller or the B-coefficient larger, then the level curves
would become flatter. If the level curves become too steep or too flat, then the optimal solution will
change. Within certain ranges, the coefficients of the objective function can change without changing
the optimal solution. These ranges are given in the “Variable cells” section of the sensitivity output,
under the headers “Allowable Increase” and “Allowable Decrease”.

2. Changes in the objective coefficient

 If we change the objective coefficient by a small amount, the optimal objective value changes a
little, but the optimal solution does not change.

 How much can we increase the objective coefficient such that the optimal solution does not
change? = How much can the level curve turn without changing the optimal solution?
 As long as the increase or decrease is within the allowable increase or allowable decrease,
the optimal objective value changes, but the optimal solution does not change.
 Objective value changes with (increase of coefficient Cj) x (value variable Xj)

3. Changes in RHS

 If we change the value of the RHS of a constraint by a small amount, the original solution remains
feasible, but there will be a slightly better alternative solution. The objective value changes a little,
this increases or decrease with the shadow price x amount of increase or decrease.
 If the shadow price is zero, the objective value will not change, and the original solution
will not change either.

[The shadow price of a constraint indicates the amount the objective function value
increases given a unit increase in the RHS value of the constraint, assuming all
other coefficients remain unchanged. Shadow prices for nonbinding constraints are
always zero]

 As stated, non-binding constraints always come with a zero-shadow


price.
 Binding constraints have a positive shadow price, but can also have a negative shadow
price:
o A binding constraint of the “<”-type:
- Maximization: Optimal solution will stay the same or rise; the shadow price
will be >0.
- Minimization: Optimal solution will stay the same or fall; the shadow price
will be <0.
o A binding constraint of the “>”-type:
- Maximization: Optimal value will stay the same or fall; the shadow price will
be <0.
- Minimization: Optimal value will stay the same or rise; the shadow price will
be >0.

 How much can we increase the RHS of a constraint, such that the per unit
objective change (shadow price) remains the same as the original per unit increase
of the RHS?
 As long as the increase or decrease is within the allowable increase or
allowable decrease, the objective value changes and the optimal solution
changes.
 Optimal solution changes “along the line” of the binding constraints.
 Objective value changes with (increase of RHS Bi) x (Shadow price -
Yi)

4. Changes in decision variables: Reduced cost

[The reduced cost for a product is its per-unit (marginal) profit: per-unit revenue minus the per-unit
cost of the resources it consumes (using the shadow prices). Reduced cost = objective coefficient –
(sum of constraints) shadow price x units used.]

 In a maximization problem, decision variables which take on their lower bound value (usually 0) at
the optimal solution must have a negative (or zero) reduced cost, otherwise we could improve our
solution (increase the objective function value) by increasing the value of that variable.
 In a minimization problem, decision variables which take on their lower bound value (usually 0) at
the optimal solution must have a positive (or zero) reduced cost, otherwise we could improve our
solution (decrease the objective function value) by increasing the value of that variable.

 It will be clear that the reduced cost information is especially relevant for decision variables that
take on a value of 0 (their lower bound value) at the optimal solution.

 Changes in some constraint coefficients can affect the optimal solution of a problem. When the
shadow price of a constraint was for example negative (= not produce, because it is unprofitable to do
so) but becomes positive so you start to produce it.

 Sometimes, the solution to an LP model displays a mathematical anomaly called degeneracy. A


solution is degenerate whenever the RHS values of any of the model’s constraints have an allowable
increase or decrease of zero. In this case, our normal interpretation of the reported shadow prices and
their ranges is no longer reliable, and our normal interpretation of the reported reduces costs is no
longer reliable as well.

EXTRA NOTES
Math LP C3 – Flow Problems
1. Network flow model introduction

o A set of nodes
o A set of connections called arcs
 With direction from tail node to head node
 Used to transport flow
o A weight or cost to transport one unit of flow from tail to head
o A capacity of each arc (acts as upper bound on the flow)

 Arc (i, j) = from tail node i to head node j.


 Variable Xij = amount of flow transported over arc (i, j)

2. Flow balance

o Inflow + supply = Outflow + demand


o Inflow-outflow = Demand – supply

o Supply node: node where flow (the supply) enters the network
o Demand node: node where flow (the demand) leaves the network
o Transshipment node: node without demand or supply

o Supply node: Inflow – outflow = - Supply


o Demand node: Inflow – Outflow = Demand
o Transshipment node: Inflow – Outflow = 0

3. Network flow model

o Variables: Flows on arcs (i, j) variable Xij


o Objective: Minimize total costs (Sum(ij): Cij x Xij)
o Constraints:
- Capacity constraints, Xij < Uij (one for each arc)
- Flow balance constraints (inflow + supply = outflow + demand) (one for each
node)
- When a constraint is neither a capacity constraint, nor a flow balance
constraint, it does not satisfy the standard structure for a network flow model.
You should add an extra node.

4. Case car transportation


 When we add up all constraints, then the LHS of the sum is 0, and therefore the RHS of the sum
must be 0 too.
 Total Demand – Total Supply = 0 / Total Supply = Total Demand

5. Supply and Demand

 If total supply exceeds total demand, then not all supply needs to be used to satisfy demand.
Therefore, the balance constraints for the supply nodes become:
o Inflow + Supply > Outflow
o Inflow – outflow > - Supply

 If total demand exceeds total supply, then not all demand can be satisfied. Therefore, the balance
constraints for the demand nodes become:
o Inflow < outflow + Demand
o Inflow – Outflow < Demand

6. Case Inventory Management

o A company has an order for 39 microwave ovens,


– 7 have to be delivered in week one,
– 9 in week two,
– 12 in week three, and
– 11 in week four.
o Production cost: Euro 10,000 per microwave oven in week 1, increases with Euro 100 per
week.
o Production capacity: 10 microwave ovens per week.
o Capacity can be increased (by working overtime) to 12 in weeks 3 and 4, at an additional cost
of Euro 1,200 per microwave oven.
o Inventory cost: Euro 550 per microwave oven per week.
o Determine an optimal production plan for this company.
o Decision Variables
– Regular production (supply) in periods 1 to 4: R1, R2, R3, and R4 non-negative
integers.
– Overtime production (supply) in periods 3 and 4: O3 and O4.
– Inventory between periods 1 and 2, 2 and 3, and 3 and 4: I12, I23, and I34
o Objective
– 10,000*R1 + 10,100*R2 + 10,200*R3 + 10,300*R4 + 11,200*O3 + 11,300*O4 +
550*I12 + 550*I23 + 550*I34
o Constraints
– Regular capacity: R1, R2, R3, R4 ≤ 10
– Overtime capacity: O3, O4 ≤ 2
– Balance: supply + inflow = demand + outflow
R1 = 7+ I12
R2+ I12 = 9 + I23
R3 + O3 + I23 = 12+ I34
R4 + O4 + I34 = 11
– All variables nonnegative integers

EXTRA NOTES

You might also like