Matrices and Determinants
Matrices and Determinants
Determinants
Why should managers care?
• The most relevant mathematical concept for managers.
• Matrices are the most widely used forms of data storage and
representation in all business scenarios.
• Matrices form the basic data structures for any data analysis in every
business scenarios.
• All data forms – both structured (such as tables) or unstructured
(such as images, voice, videos) are essentially represented using
matrices.
• The relationships between any two datapoints are represented using
determinants. Determinants are the primary metric for measuring
any dataset relationships.
• Almost all statistical analyses and optimization tools function using
matrix algebra and determinants (e.g. Pair of equations, linear
programming, regression, etc.)
2
Points and Vectors
• Point: Zero-dimensional entity.
O
Y
• Point on line: Uni-dimensional Vector.
Q (-3,4)
P (4,2)
B (-3) O (0) A (2)
[ ]
P (4, 2) P 4 2
Q (-3, 4) Q −3 4
• A matrix is a collection of multiple vectors (i.e., set of points in space)
• A matrix is a consolidated representation of multiple vectors (points)
using a single data structure.
• In general, rows represent a single vector: It contains different
attributes of a single point (Each point represents an individual entity,
e.g., P, Q, etc.)
• Columns represent the specific attributes of the entity in rows. For
instance, the x1 attribute of the entity P has a measure 4.
Spreadsheet demonstration
• While it is customary to
Matrix: Columns: Attributes of
mention entities in rows and
entities
their attributes in columns, the
reverse practice may also be
adopted.
• In such cases, the points are
represented as column vectors
Rows: Individual and the matrix is a combination
Individual 5-dimensional
of column vectors.
Entities Vectors (points)
• In either cases, the
interpretation remains the
same.
• In general matrix algebra, the
transformation of rows into
x x x x x 15 x Matrix dimensions
columns and vice-versa is a
1 2 3 4 5
5 frequent practice. While
No. of rows No. of columns performing matrix operations,
the distinction of significance
Other illustrations and examples
(1/2)
• Suppose we wish to express the information that Radha has
15 notebooks. We may express it as [15] (15 is a uni-dimensional
vector)
• Now, we have to express that Radha has 15 notebooks and 6
pens
We may express it as [15 6] (It is a two-dimensional vector
where notebooks and pens are its dimensions)
• Let us now suppose that we wish to express the information
of possession of notebooks and pens by Radha and her two
friends Fauzia and Simran which is as follows:
o Radha has 15 notebooks and 6 pens
o Fauzia has 10 notebooks and 2 pens
o Simran has 13 notebooks and 5 pens
Other illustrations and examples
(2/2)
Matrix: Formal definition
• A matrix is an ordered rectangular array of numbers or
functions. The numbers or functions are called the elements
or the entries of the matrix.
Order of a Matrix
• A matrix having m rows and n columns is called a matrix of
order m × n
[ ]
1 5/2
1/ 2 2
0 3/ 2
Types of matrices (1/4)
• Zero matrix: A matrix is said to be zero matrix or null matrix if all its elements are zero
Types of matrices (4/4)
• Upper triangular Matrix: A Matrix is said to be an upper triangular
matrix if it satisfies the following conditions:
ii. All the elements which lie below the diagonal should be zero.
ii. All the elements which lie above the diagonal should be zero.
Transpose of a Matrix
Consider a Matrix A, then the transpose of A denoted AT can be
obtained by interchanging the rows of A as columns or columns of A
as rows
Properties of Matrix
Transpose:
• This means that [aij] = [aji] for all possible values of i and j
• This means that aji = – aij for all possible values of i and j
• X=
Example
Find the values of x and y from the following equation:
Solution:
A Scenario
• Akbar and Birbal are two friends. Akbar wants to buy 2 pens and 5
story books, while Birbal needs 8 pens and 10 story books. The
prices are as follows: Pen – Rs 5 each, story book – Rs 50 each.
How much money Can doeswe represent
each need tothe scenario using matrices?
spend?
Price matrix
Requirements matrix Money matrix
pens books
A pens
× =
B books
Akbar(A): 5×2 + 50×5 = 260
Birbal(B): 5×8 + 50×10 Matrix
= 540 Multiplication Operator
Matrix Multiplication
• Now suppose that they enquire about the rates from another
shop, quoted as follows: pen – Rs 4 each, story book – Rs 40
each
• To get the (i, k)th element cik of the matrix C, we take the ith row of A and kth column of B,
multiply them elementwise and take the sum of all these products.
Matrix Multiplication
• In other words, if A = [aij] m × n , B = [bjk] n × p
• Then the ith row of A is [ai1 ai2 ... ain] and the kth column of
B is
• The matrix C = [cik]m × p is the product of A
Example
Solution:
Properties of Matrix Multiplication
• Matrix multiplication is associative → A(BC) = (AB)C
Solution:
Let . Hence,
. Hence,
Point on line
A (x1)
One Uni-dimensional vector Length
Ever heard of absolute value / modulus
(How to measure?) B (-3) O (0) A (2)
.
Observe
PPoint
(x1,y1)in plane Two Two-dimensional vector Area the
symbol.
(How to
measure
?)
RPoint in space
(x1,x2,x3) Three 3-dimensional Vector. Volume
Determinant
Point in hyperplane
S (x1,x2,x3, … , xn)
n (n>3) n-dimensional vector n-dim
volume 36
Determinant
• A determinant is a quantity which determines the metric of the
respective dimensional vector.
Y
Now check for the matrix Q (-3,4)
Area of this parallelogram P (4,2)
det ( 𝐵 )=| 𝐵|=4 × 4 − ( − 3 ) × 2= 16+6= 22
X
O (0,0)
Higher Order Determinants
Expansion along first Row (R1)
Multiply first element a11 of R1 by (–1) (1 + 1) [(-1) (sum of suffixes in a11 ] and
with the second order determinant obtained by deleting the
elements of first row (R1) and first column (C1) of | A | as a11 lies in
R1 and C1
5 1 2 24
7 2 0 =MDETERM(L3:N5)
1 2 0
Refer to the
13 12 13 10 3456 embedded excel
6 12 13 5 =MDETERM(L8:O11) sheet
3 15 15 11
12 15 11 10
-1 -6 -4 -10 1 -87858
4 -3 10 3 -3 =MDETERM(L13:P17)
8 6 1 -8 -10
-1 -1 -1 6 -4
10 4 5 -4 8
Properties of Determinants
• Let B be another square matrix, such that , the identity matrix of the
corresponding order.
47
Cofactor Matrix
• Let
49
Example
• If , find .
Solution:
(i) Finding |A| = 1x4 – 2x3 = -2
(ii) Finding Co-factor matrix, C and Adjunct Matrix Adj(A):
;;;.
(i)
(ii)
(iii) Finding Co-factor matrix, C and Adjunct Matrix Adj(A):
;;;
.
Example (…ctd.)
(iv)
A= 3 -2 3 B= 8
2 1 -1 1 Refer to the
4 -3 2 4 embedded excel
sheet
A_inv = 0.06 0.29 0.06 {=MINVERSE(L20:N22)}
0.47 0.35 -0.53
0.59 -0.1 -0.41
x 1 {=MMULT(L24:N26,Q20:Q22)}
y 2
z 3
Back to the example in slide 35
2𝑑 1+5𝑑 3=3;2𝑑2+5𝑑 4=0;3𝑑1+48 𝑑3=43;3𝑑 2+48 𝑑 4=22. ;
A= 2 0 5 0 B= 3
0 2 0 5 0
3 0 48 0 43
0 3 0 48 22
d1 -0.877 {=MMULT(L38:O41,R33:R36)}
d2 -1.358
d3 0.9506
d4 0.5432
Practice Problems (Do them Yourself)
Ex1.
Ex2.
Practice Problems (Do them Yourself)
Ex4.
Ex5.
All the Best!!!