Professional Documents
Culture Documents
Math C1 - Matrices and Vectors
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
2. Vectors
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
A(x+y) = Ax + Ay
A(cx) = cAx
[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]
o Power of a matrix: For a square matrix A we write A2 and for AAA A3, etc.
AI = IA = A
(AB)T = BTAT
EXTRA NOTES
Math C2 – Systems of linear equation
1. Systems of linear equation
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.
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.
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
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))
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.
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.
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”.
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]
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)
[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.
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)
2. Flow balance
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
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
EXTRA NOTES