FDS - Module 2
Mathematical Foundation for Data Science
Vectors
• A vector is an abstract data type used to represent properties that have both
direction and magnitude
• A vector can be represented:
o As a list
o As a 1-D array
o Graphically (as an arrow)
o Using set notation
o As a dictionary (which can be considered to be representing it as a function)
• Vectors give us a simple way of storing multiple dimensions of a single data point /
observation.
• Consider that we measure the average satisfaction rating (0-100) of employees for
three departments of a company as being 57 for HR, 89 for engineering, and 94 for
management. We can represent this as a vector with the following formula:
• This vector holds three different bits of information about our data. This is the
perfect use of a vector in data science.
Python Implementation
• We represent arrays using Python Lists. Ex: x = [3, 6, 8]
• Using NumPy:
import numpy as np
x = np.array([3, 6, 8])
Matrices
• A matrix is a 2-dimensional representation of arrays of numbers
• The dimension of the matrix, denoted as n x m, tells us that the matrix has n rows
and m columns.
• Revisiting our previous example, let's say we have three offices in different
locations, each with the same three departments: HR, engineering, and
management.
• We could make three different vectors, each holding a different office's
satisfaction scores, as shown:
• However, this is not only cumbersome, but also unscalable. What if you have 100
different offices? Then we would need to have 100 different 1-dimensional arrays
to hold this information.
• This is where a matrix alleviates this problem. Let's make a matrix where each row
represents a different department and each column represents a different office,
as shown:
Uses of Matrices
• Used to store information like weights in an ANN, while training various algorithms
• Applications in computer graphics (Translation, Rotation, Scaling)
• Convert geometric data into different coordinate systems.
• Image Processing applications
Properties of Matrices
1. Determinant of a Matrix
The determinant is defined as a scalar value which is associated with the square
matrix. If X is a matrix, then the determinant of a matrix is represented by |X| or
det(X).
|A| = ad − bc
|A| = a(ei − fh) − b(di − fg) + c(dh − eg)
• The determinant helps us find the inverse of a matrix, tells us things about the
matrix that are useful in systems of linear equations, calculus and more.
2. Trace of a Matrix
3. Rank of a Matrix
• The rank of the matrix refers to the number of linearly independent rows or
columns in the matrix.
• Rank of a matrix can be found by counting the number of linearly independent
non-zero rows or non-zero columns.
• ρ(A) is used to denote the rank of matrix A.
• A matrix is said to be of rank zero when all of its elements become zero.
• The rank of the matrix is the dimension of the vector space obtained by its
columns.
• The rank of a matrix cannot exceed more than the number of its rows or columns.
• Full Rank Matrix
Full Row Rank: When the rows of the matrix are linearly independent
Full Column Rank: When the columns of the matrix are linearly independent
Nullity of a Matrix
• Null Space:
o The null space of any matrix A consists of all the vectors B such that AB = 0
and B is not zero.
o It can also be thought as the solution obtained from AB = 0 where A is known
matrix of size m x n and B is matrix (vector) to be found of size n x 1.
o The size of the null space of the matrix provides us with the number of linear
relations among attributes.
𝑋11 … 𝑋1𝑛 𝑏1
.
o Ex: if 𝐴 = [ … … … ], then there should be a vector B [ . ], in A’s null
𝑋𝑚1 … 𝑋𝑚𝑛 𝑏𝑛
space so that the following equations are satisfied:
𝑋11 𝑏1 + 𝑋12 𝑏2 + ⋯ + 𝑋1𝑛 𝑏𝑛 = 0
.
.
.
𝑋𝑚1 𝑏1 + 𝑋𝑚2 𝑏2 + ⋯ + 𝑋𝑚𝑛 𝑏𝑛 = 0
AB = 0 implies every row of A when multiplied by B goes to zero.
• Nullity:
o Nullity can be defined as the number of vectors present in the null space of a
given matrix. In other words, the dimension of the null space of the matrix A
is called the nullity of A.
o The number of linear relations among the attributes is given by the size of the
null space. (Rank gives number of non-linearly independent attributes/cols)
o Nullity of A + Rank of A = Total number of attributes of A (i.e. total number of
columns in A)
Python Implementation
• Creating a 2D Array:
import numpy as np
A = np.array([[2.1, 7.9, 8.4],
[3.0, 4.5, 2.3],
[12.2, 6.6, 8.9],
[1.8, 1.0, 8.2]])
• Transpose of the above Matrix:
A.T
#output: array([[ 2.1, 3. , 12.2, 1.8],
[ 7.9, 4.5, 6.6, 1. ],
[ 8.4, 2.3, 8.9, 8.2]])
• Access shape using
A.shape #output: (4, 3)
• To get a complete column, it is possible to use a colon:
A[:, 0] #output: array([ 2.1, 3. , 12.2, 1.8])
• Similarly, to get a specific row, you can do:
A[1, :] #output: array([3. , 4.5, 2.3])
• If the array is a vector (1D Numpy array), it is created as follows:
v = np.array([1, 2, 3])
v.shape #output: (3,)
• Note the difference between how a vector and array are created: If it is a matrix,
the shape has two numbers and two opening square brackets. Ex:
v = np.array([[1, 2, 3]])
v.shape #output: (1, 3)
• Reshape Function:
v = np.array([3, 4]).reshape(2, 1)
#Output: [[3]
[4]]
v = np.array([3, 4]).reshape(2, 1)
#Output: [[3 4]]
• Dot Product of 2 Numpy Matrices (using @ operator) / Weighting of 2 Matrices
A = np.array([
[1, 2],
[5, 6],
[7, 8]
])
v = np.array([3, 4]).reshape(2, 1)
A @ v
#Output: array([[11],
[39],
[53]])
• To find the Covariance matrix of several vectors:
x = np.array([1, 2, 3, 4, 5, 6])
y = np.array([5, 9, 4, 6, 7, 1])
z = np.array([56, 58, 78, 23, 67, 86])
np.cov([x, y, z])
• vstack: Stack a sequence of vectors on top of each other to get a 2D Matrix
np.vstack([x, y, z])
#output: array([[ 1, 2, 3, 4, 5, 6],
[ 5, 9, 4, 6, 7, 1],
[56, 58, 78, 23, 67, 86]])
• Determinant of a Matrix (using np.linalg.det())
A = np.array([[10, 65],
[22, 36]])
np.linalg.det(A)
• Making a matrix using numpy.matrix
a = np.matrix('[10, 65; 22, 36]') #note the syntax ('[ ; ]')
#output: matrix([[10, 65],
[22, 36]])
• Trace of a Matrix (using numpy.matrix.trace())
a = np.matrix('[10, 65; 22, 36]')
a.trace()
#Output: matrix([[46]])
• Rank of a Matrix (using numpy.linalg.matrix_rank())
a = np.array([[1, 2, 3, 4],
[2, 4, 6, 8],
[3, 7, 5, 1]])
np.linalg.matrix_rank(a)
#Output: 2
b = np.array([[1, 2, 3, 4],
[8, 6, 4, 3],
[3, 7, 5, 1]])
np.linalg.matrix_rank(b)
#Output: 3
• Find the Nullspace of a Matrix
from sympy import Matrix
A = [[1, 2, 0], [2, 4, 0], [3, 6, 1]]
A = Matrix(A)
A.nullspace()
#output: [Matrix([[-2],
[1],
[0]])]
• Find the Nullity of a Matrix (nullity = number of columns - rank of the matrix)
from sympy import Matrix
A = [[1, 2, 0], [2, 4, 0], [3, 6, 1]]
A = Matrix(A)
r = A.rank()
noc = A.shape[1] #number of columns
print("Nullity is: ", noc - r)
#output: Nullity is: 1
Eigenvalues and Eigenvectors
• The non-zero vectors 𝐱 that satisfy the equation A𝐱 = λ𝐱 for a given matrix 𝐀 and
a scalar 𝛌 are called the eigenvectors of matrix 𝐀 and 𝛌 are called the eigenvalues
of matrix 𝐀.
Python Code:
eValue, eVector = np.linalg.eig(a)
(where a is a 2D numpy array)
• The eigenvalues of A are the solutions of the quadratic equation 𝜆2 − 𝜆 − 12 = 0,
namely 𝜆1 = −3 and 𝜆2 = 4.
• Thus, the nonzero vectors 𝐱 that satisfy A𝐱 = −3𝐱 are called eigenvectors
associated with the eigenvalue 𝜆 = −3. One such eigenvector is
and all other eigenvectors corresponding to the eigenvalue (−3) are simply scalar
multiples of 𝑢1 — that is, 𝑢1 spans this set of eigenvectors.
• Similarly, we can find the eigenvectors associated with the eigenvalue 𝜆 = 4 by
solving A𝐱 = 4𝐱
Distance Measures in Data Science
• A distance measure is an objective score that summarizes the relative difference
between two objects in a problem domain.
• Most commonly, the two objects are rows of data that describe a subject (such as
a person, car, or house), or an event (such as a purchase, a claim, or a diagnosis).
• A short list of some of the more popular machine learning algorithms that use
distance measures at their core is as follows:
o K-Nearest Neighbors
o Self-Organizing Map (SOM)
o K-Means Clustering
1. Euclidean Distance ✪
• It is a distance measure that best can be explained as the length of a segment
connecting two points.
• Given by the formula:
• Disadvantage: Although it is a common distance measure, Euclidean distance is
not scale in-variant which means that distances computed might be skewed
depending on the units of the features.
• Typically, one needs to normalize the data before using this distance measure.
• Uses: In algorithms like KNN when data used is of low dimensions.
• Example: 𝑣1 = (2, 3, 5) | 𝑣2 = (5, 8, 7). The Euclidean distance between them is:
√(2 − 3)2 + (3 − 8)2 + (5 − 7)2 = √38 = 6.116
• Python Implementation:
import numpy as np
import scipy.spatial.distance as sp
x = np.array([2, 3, 5])
y = np.array([5, 8, 7])
euclideanDist = sp.euclidean(x, y)
print(euclideanDist)
- 2. Cosine Similarity ✪
• Cosine similarity has often been used as a way to counteract Euclidean distance’s
problem with high dimensionality.
• The cosine similarity is simply the cosine of the angle between two vectors.
• It also has the same inner product of the vectors if they were normalized to both
have length one.
• Two vectors with exactly the same orientation have a cosine similarity of 1
(𝑎𝑠 cos(0) = 1), whereas two vectors diametrically opposed to each other have a
similarity of -1 (𝑎𝑠 cos(180) = −1), .
• Given by the formula:
• Disadvantage: One main disadvantage is that the magnitude of
vectors is not taken into account, merely their direction. This means that the
differences in values are not fully taken into account.
• Uses: When we have high-dimensional data and when the magnitude of the
vectors is not of importance. Ex: Text Analysis (data is represented by word counts)
• Example: 𝑥 = (3, 2, 0, 5) 𝑎𝑛𝑑 𝑦 = (1, 0, 0, 0). The cosine similarity, cos(𝑥, 𝑦) is
‖𝑥 ‖ = √32 + 22 + 0 + 52 = √38 = 6.116
‖𝑦‖ = √12 + 0 + 0 + 0 = √1 = 1
3
cos 𝜃 = cos (𝑥, 𝑦) = = 0.49
√ 38 ∗ 1
• Python Implementation:
import numpy as np
import scipy.spatial.distance as sp
x = np.array([3, 2, 0, 5])
y = np.array([1, 0, 0, 0])
cosineDist = 1 - sp.cosine(x, y)
print(cosineDist)
3. Manhattan Distance ✪
• It calculates the distance between real-valued vectors. Manhattan distance then
refers to the distance between two vectors if they could only move right angles.
• There is no diagonal movement involved in calculating the distance.
• Given by the formula:
• Disadvantage: Less intuitive than Euclidean distance, especially while used on
high-dimensional data. Moreover, it is more likely to give a higher distance value
than Euclidean distance since it does not the shortest path possible.
• Uses: When your dataset has discrete and/or binary attributes
• Example: 𝑥 = (2, 4, 4, 6) 𝑎𝑛𝑑 𝑦 = (5, 5, 7, 8). The Manhattan distance is
‖(2 − 5)‖ + ‖(4 − 5)‖ + ‖(4 − 7)‖ + ‖(6 − 8)‖ = 9
• Python Implementation:
import numpy as np
import scipy.spatial.distance as sp
x = np.array([2, 4, 4, 6])
y = np.array([5, 5, 7, 8])
manhattanDist = sp.cityblock(x, y)
print(manhattanDist)
4. Hamming Distance
• Hamming distance is the number of values that are different between two vectors.
• It is typically used to compare two binary strings of equal length.
• It can also be used for strings to compare how similar they
are to each other by calculating the number of characters
that are different from each other.
• Disadvantages: Difficult to use when two vectors are not
of equal length. Not advised to use this distance measure when the magnitude is
an important measure
• Uses: Error correction/detection when data is transmitted over computer
networks. It can be used to determine the number of distorted bits in a binary
word as a way to estimate error.
5. Chebyshev Distance
• Chebyshev distance is defined as the greatest of difference between two vectors
along any coordinate dimension.
• In other words, it is simply the maximum distance along one axis.
Given by:
• Disadvantages: Chebyshev is typically used in very specific use-cases.
• Uses: Used to extract the minimum number of moves needed by a king (in a
chessboard) to go from one square to another.
6. Minkowski
• Minkowski distance is a bit more intricate measure than most.
It is a metric used in Normed vector space (n-dimensional real
space), which means that it can be used in a space where
distances can be represented as a vector that has a length.
Given by:
Common values of 𝑝 are:
• 𝑝 = 1 ⟶ Manhattan distance
• 𝑝 = 2 ⟶ Euclidean distance
• 𝑝 = ∞ ⟶ Chebyshev distance
• Disadvantages: finding the right value of 𝑝 can be quite computationally inefficient
• Uses: Possibility to iterate over it and find the distance measure that works best
for your use case. It allows you a huge flexibility over your distance metric.
7. Jaccard Index
• The Jaccard index (or Intersection over Union) is a metric
used to calculate the similarity and diversity of sample sets.
• It is the size of the intersection divided by the size of the
union of the sample sets. Given by:
• Disadvantages: Highly influenced by the size of the data. Large datasets can have a
big impact on the index as it could significantly increase the union whilst keeping
the intersection smaller.
• Uses: Used where data is binary or binarized. Deep learning model predicting
segments of an image. Text similarity analysis. Thus, it can be used to compare sets
of patterns.
8. Haversine
• Haversine distance is the distance between two points on a
sphere given their longitudes and latitudes.
• It is very similar to Euclidean distance in that it calculates the
shortest line between two points. The main difference is that no
straight line is possible since the assumption here is that the
two points are on a sphere.
• Disadvantages: It is seldom the case that the points lie on a sphere. Ex: the earth is
not perfectly round which could make calculation in certain cases difficult.
• Uses: Often used in navigation.
9. Sorensen-Dice Index
• The Sørensen-Dice index is very similar to Jaccard index in
that it measures the similarity and diversity of sample sets.
• It is a bit more intuitive because it can be seen as the
percentage of overlap between two sets, which is a value
between 0 and 1. Given by:
• Disadvantages: Like the Jaccard index, they both overstate the importance of sets
with little to no ground truth positive sets
• Uses: Image segmentation tasks or text similarity analyses
Projections
• A projection is a linear algebra concept that
helps us understand many of the
mathematical operations we perform on
high-dimensional data.
• In linear algebra and functional analysis, a
projection is a linear transformation 𝑃 from
a vector space to itself such that 𝑃2 = 𝑃
• Orthogonal Projection
o For example, the function which maps
the point (𝑥, 𝑦, 𝑧) in three-dimensional
space ℝ3 to the point (𝑥, 𝑦, 0), is an orthogonal projection onto the 𝑥𝑦-plane.
This function is represented by the matrix:
o The action of this matrix on an arbitrary vector is (matrix P × arbitrary vector)
o To see that 𝑃 is indeed a projection, i.e., 𝑃 = 𝑃 2 , we compute
o Observing that 𝑃𝐓 = 𝑃 shows that the projection is an orthogonal projection.
• Oblique Projection
o A simple example of a non-orthogonal (oblique) projection is
o Via matrix multiplication, one sees that
proving 𝑃 is indeed a projection.
The projection 𝑃 is orthogonal if and only if 𝛼 = 0 because only then 𝑃 𝐓 = 𝑃
Need for Projections
• Suppose we have a matrix 𝑨 comprising of two column vectors 𝒂𝟏 and 𝒂𝟐.
• Now, we have to find solution of 𝑨𝒙 = 𝒃, such that vector 𝒃 does not lie in
column space of matrix 𝑨. (see figure in next page)
• Looks like there are no solutions to this equation because there is no way
vector 𝒃 could be represented as a linear combination of 𝒂𝟏 and 𝒂𝟐
• But, if we project vector 𝒃 onto the column space of 𝑨, vectors 𝒑, 𝒂𝟏 and 𝒂𝟐 all lie
in the same vector space.
• Therefore, vector 𝒑 could be represented as a linear combination of
vectors 𝒂𝟏 and 𝒂𝟐 (as 𝑝, 𝑎1 , 𝑎2 are all in the same vector space).
𝑝 = 𝑥1 𝑎1 + 𝑥2 𝑎2
• This could be broken down in the form of matrices:
𝑥1
𝑝 = [𝑎1 𝑎2 ] [𝑥 ]
2
𝑝 = 𝐴𝑥
• We can solve for matrix 𝒙 and we may get a solution to the problem we previously
thought was unsolvable.
Inner Products and Outer Products
• Inner product: If 𝑢 and 𝑣 are column vectors with the same size, then the scalar
𝑢𝐓 𝑣 is the inner product of u and v. Example:
• Outer Product: If 𝑢 and 𝑣 are column vectors of any size, then the matrix 𝑢𝑣 𝐓 is
the outer product of u and v. Example:
• More generally, given two tensors (multidimensional arrays of numbers), their
outer product is a tensor
• The "inner product" (a generalization of the dot product), takes a pair of
coordinate vectors as input and produces a scalar.
• If the two vectors have dimensions n and m, then their outer product is
a n × m matrix.
Notion of Hyper Planes
• In geometry, a hyperplane is a subspace whose dimension is one less than that of
its ambient space.
• If a space is 3-dimensional then its hyperplanes are the 2-dimensional planes, while
if the space is 2-dimensional, its hyperplanes are the 1-dimensional lines.
• This notion can be used in any general space in which the concept of the
dimension of a subspace is defined.
In the given figure, two intersecting planes in 3-D space
is shown. A plane is a hyperplane of dimension 2, when
embedded in a (ambient) space of dimension 3.
Application of Hyperplanes in Data Science
• Hyperplanes are decision boundaries that help classify the data points.
• Data points falling on either side of the hyperplane can be attributed to different
classes.
• Also, the dimension of the hyperplane depends upon the number of features.
• If the number of input features is 2, then the hyperplane is just a line.
• If the number of input features is 3, then the hyperplane becomes a two-
dimensional plane.
• It becomes difficult to imagine when the number of features exceeds 3
Half-Plane
• A half-plane is a planar region consisting of all points on one side of an infinite
straight line, and no points on the other side.
• If the points on the line are included, then it is called a closed half-plane. If the
points on the line are not included, then it is called an open half-plane.
• Example:
𝑥 − 2𝑦 = 1
(1, 0)
(-1, -1)
Finding Normal to a Plane
Vector equation of a plane passing through three points with position vectors 𝑎⃗, 𝑏⃗⃗, 𝑐⃗ is
Example: Find an equation for the plane passing through the points 𝑄(−1, 1, 2),
𝑅(−4, 2, 2) and 𝑆(−2, 1, 5).
Solution: Let 𝑄 = 𝑎⃗, 𝑅 = 𝑏⃗⃗, 𝑆 = 𝑐⃗. Thus, 𝑎⃗ (−1, 1, 2), 𝑏⃗⃗(−4, 2, 2) and 𝑐⃗ (−2, 1, 5)
𝑏⃗⃗ − 𝑎⃗ = (−4 − (−1))𝑖̂ + (2 − 1)𝑗̂ + (2 − 2)𝑘̂ = −3𝑖̂ + 1𝑗̂ + 0𝑘̂
𝑐⃗ − 𝑎⃗ = (−2 − (−1))𝑖̂ + (1 − 1)𝑗̂ + (5 − 2)𝑘̂ = −1𝑖̂ + 0𝑗̂ + 3𝑘̂
𝑖̂ 𝑗̂ 𝑘̂
(𝑏⃗⃗ − 𝑎⃗) × (𝑐⃗ − 𝑎⃗ ) = |−3 1 0| = 3𝑖̂ − (−9)𝑗̂ + 1𝑘̂ = 3𝑖̂ + 9𝑗̂ + 1𝑘̂
−1 0 3
3𝑖̂ + 9𝑗̂ + 1𝑘̂ is the normal to the plane in which the given points lie. Now,
(𝑟⃗ − 𝑎⃗ ) = (𝑥 − (−1))𝑖̂ + (𝑦 − 1)𝑗̂ + (𝑧 − 2)𝑘̂ = (𝑥 + 1)𝑖̂ + (𝑦 − 1)𝑗̂ + (𝑧 − 2)𝑘̂
(𝑟⃗ − 𝑎⃗ ) ∙ [(𝑏⃗⃗ − 𝑎⃗) × (𝑐⃗ − 𝑎⃗ )] = [(𝑥 + 1)𝑖̂ + (𝑦 − 1)𝑗̂ + (𝑧 − 2)𝑘̂ ] ∙ 3𝑖̂ + 9𝑗̂ + 1𝑘̂
= 3(𝑥 + 1) + 9(𝑦 − 1) + 1(𝑧 − 2) = 3𝑥 + 3 + 9𝑦 − 9 + 𝑧 − 2
⇒ 3𝑥 + 9𝑦 + 𝑧 − 8 = 0 is the equation of the plane that passes through the given
points.
Positive Definite Matrix (PDM)
• A matrix is positive definite if it is symmetric and all its eigenvalues are positive.
• One equivalent definition can be derived using the fact that for a symmetric matrix
the signs of the pivots are the signs of the eigenvalues.
• So, for example, if a 4 × 4 matrix has three positive pivots and one negative pivot, it
will have three positive eigenvalues and one negative eigenvalue.
• Hence, a matrix is positive definite if it is symmetric and all its pivots are positive.
Example of PDM: Check if the following matrix is a PDM (Method 1)
2 −1 0
𝐴 = [−1 2 −1]
0 −1 2
Step 1: Check if it is a symmetric matrix: Yes, matrix A is a symmetric matrix.
Step 2: Find the Eigenvalues of matrix A.
2 −1 0 1 0 0
|[−1 2 −1] − 𝜆 [0 1 0]| = 0
0 −1 2 0 0 1
2 −1 0 𝜆 0 0
|[−1 2 −1] − [0 𝜆 0]| = 0
0 −1 2 0 0 𝜆
2−𝜆 −1 0
|[ −1 2−𝜆 −1 ]| = 0
0 −1 2−𝜆
∴ (2 − 𝜆)[(2 − 𝜆)2 − 0] − (−1) ∗ [(−1) ∗ (2 − 𝜆) − 0] + 0 = 0
∴ 𝜆3 − 6𝜆2 + 11𝜆 − 6 = 0
Solving the above equation, we get: 𝜆1 = 1, 𝜆2 = 3 𝑎𝑛𝑑 𝜆3 = 2
As all the Eigenvalues are positive, the given matrix is a PDM.
Example of PDM: Check if the following matrix is a PDM (Method 2)
2 −1 0
𝐴 = [−1 2 −1]
0 −1 2
All the pivots will be positive if and only if 𝑑𝑒𝑡(𝐴𝑘 ) > 0 for all 1 ≤ 𝑘 ≤ 𝑛 where 𝐴𝑘
is the upper left 𝑘 × 𝑘 submatrix.
det(𝐴1 ) = |2| = 2
2 −1
det(𝐴2 ) = | |=4−1=3
−1 2
2 −1 0
det(𝐴3 ) = |−1 2 −1| = 2(4 − 1) − (−1)(−2 − 0) + 0 = 4
0 −1 2
As all det(𝐴𝑘 ) > 0 ∴ all the pivots are positive ⇒ the given matrix is a PDM
Inverse of a Matrix
3 0 2
𝐴 = [ 2 0 −2]
0 1 1
Step 1: Find Minor Matrix: (Ex: minor(3) = 0*1 - (-2)*1 = 2
2 2 2
𝑚𝑖𝑛𝑜𝑟(𝐴) = [ −2 3 3]
0 −10 0
Step 2: Find Co-factor matrix: apply (+ - +) and (- + -) alternatively
2 −2 2
𝑐𝑜𝑓𝑎𝑐𝑡𝑜𝑟(𝑚𝑖𝑛𝑜𝑟(𝐴)) = [ 2 3 −3]
0 10 0
Step 3: Find Adjoint matrix (transpose of cofactor matrix)
2 2 0
𝑎𝑑𝑗𝑜𝑖𝑛𝑡(𝐴) = [−2 3 10]
2 −3 0
Step 4: find det(A) = 10
Step 5:
1 1 2 2 0
𝐴−1 = ∗ 𝑎𝑑𝑗𝑜𝑖𝑛𝑡(𝐴) = ∗ [−2 3 10]
det(𝐴) 10
2 −3 0