Linear Algebra Assignment
Linear Algebra Assignment
Linear Algebra Assignment
Linear algebra is the branch of mathematics concerning linear equations and linear
functions and their representations in vector spaces and through matrices. Linear
algebra is used to solve systems of equations, create linear models, and approximate
solutions to equations. Moreover, linear algebra is also used in most sciences and
engineering areas, because it provides the vast majority of numerical tools and allows
modelling many natural phenomena, and efficiently computing with such models.
A linear equation system is a collection of one or more linear equations involving the
same set of variables such that all equations in the system are considered
simultaneously.
Example:
−x +2 y+ 4 z=−8
3 x+ 2 y −z=−2
x + y +2 z =2
The example shows a system of three equation in three variables which is x, y and z. To
find the solution to the linear equation system, we must calculate a numerical value for
each variable in the system which can satisfy all equation in the same time. The solution
to the system above is given by x=4 , y=−6 , z=2 and it makes all three equations
valid. The word ‘system’ indicates that the equations are considered collectively, rather
than individually.
Where x 1 , x 2 , … , x n are the unknowns, a 11 ,a 12 , … , amn are the coefficients of the system
Besides the linear equation system with two variables, when we solve the system
with three variables with another method such as Elementary Row Operation, there
are also has 3 possible types of solutions.
2.2 Example of 3 Types of Linear Equation System with 3 Variables.
1 −1 2 −3 1 −1 2 −3
( 2 1 −1 0
−1 2 −3 7 |) −2 R1+ R 2 → R2
→ (0 3 −5 6
−1 2 −3 7 |)
1 −1 2 −3 1 −1 2 −3
→ (
R3 + R1 → R3 0 3 −5 6
0 1 −1 4 |) R3 ↔ R2
→ ( 0 1 −1 4
0 3 −5 6 |)
1 −1 2 −3 1 −1 2 −3
→ (
3 R2 + R3 → R3 0 1 −1 4
0 0 −2 −6 |) −1
R
2 3
→ ( 0 1 −1 4
0 0 1 3 |)
From last row, z=3
From second row, y−z =4
y−3=4
y=7
From first row, x− y −2 z=−3
x−7=2 ( 3 )=−3
x−1=−3
x=−2
After solving the linear equation by ERO, the augmented matrix become
row echelon form. From the last row, we get that z=3 , and the second
row, y−z =4 . By substituting z=3 , we get y=7 . Lastly, from the first row,
we substitute the y and z, we will get x=−2. And we can write our
solution as (−2 , 7 ,3 ) which is the only solution that satisfy all the linear
equation in the system. Therefore, the system has a unique solution.
1 0 −1 −2
R2−R 3 → R 3
→ ( |)
0 1 −3 −4
0 0 0 0
When finishing ERO, we get that 0 = 0 from the last row which is a true
equation. This means the equations are consistent and have infinite
number of solutions. The planes intersect in a line. Since the variable z
can be any real number, we use t to represent z and continue to find x
and y. So, by substitute z=t to first row and second row, we get x=t−2
and y=3 t−4. Therefore, the solution is ( t−2 , 3t−4 , t ) where t can be
any real number.
→ (
R2 + R3 → R2 0 4 0 8
−1 1 1 2 |) 1
R
4 2
→
(
0 1 0 2
2 0 −2 1 |)
−1 0 −1 −1 −1 0 −1 −1
R2−R 1 → R 1
→ (0 1 0 2
2 0 −2 1 |) 2 R1+ R 3 → R 3
→ (0 1 0 2
0 0 0 −1|)
After finishing ERO, we get 0=−1 from the last row which is a false
equation. This means the equations are inconsistent and have no
solution. The planes don’t have a common intersection and there is not
any (x, y, z) that make all 3 equations true.
as u⃗ =( u1 ,u 2 , … , un ). For example, the vector ⟨ 1,2 ⟩ ∈ R2 represents a vector that has
moved 1 along the x-axis and 2 along the y-axis.
Two vectors are the same if they have the same magnitude and direction. This means
that if we take a vector and translate it to a new position without rotating, then the vector
we obtain at the end of this process is the same vector we had in the beginning. Two
examples of vectors are force and velocity.
Basically, vector has three types of operations which is addition, subtraction and
multiplication. Below are the examples of addition and subtraction.
Addition
b ⟨ 26 ,7 ⟩
c
a ⟨ 8 ,13 ⟩
Subtraction
To subtract, we first reverse the vector that we want to subtract, then add.
a=v +(−k )
a=⟨ 12 , 2 ⟩ + [ − ⟨ 4 ,5 ⟩ ]
Besides, there are two types of multiplications of vector which are dot product and cross
product.
3.1.2 Vector Multiplication - Dot Product
Dot product also known as scalar product because it takes two vectors as the
input and give one number as an output. Generally, the dot product is written as
a∙b .
a ∙ b=( a1 b1 ) + ( a2 b 2 )+ ( a3 b3 )
a ∙ b=[ ( 2 )( 1 ) ] + [ ( 4 ) (−3 ) ]
a ∙ b=2−12=−10
Besides, we can also use dot product to calculate the angle between two vectors
by using formula:
a ∙ b=|a||b|cos θ
Where:
|a| is the magnitude of vector a
|b| is the magnitude of vector b
θ is the angle between a and b
Example:
Given that a=⟨ 2 , 2 ,−1 ⟩ and b=⟨ 5 ,−3 , 2 ⟩, find the angle between a and b.
2 2 2
|a|= √( 2 ) + ( 2 ) + (−1 )
|a|= √9=3
2 2 2
|b|= √( 5 ) + (−3 ) + ( 2 )
|b|= √ 38
a ∙ b=( a1 b1 ) + ( a2 b 2 )+ ( a3 b3 )
b
Orthogonal Vectors
If the angle between two vectors is 90 ° , the vectors are orthogonal which means
that the vector is perpendicular to another vector. For any orthogonal vectors, a ∙ b is
equal to 0 because cos 90° =0.
Cross product is the process of multiplying two vectors to get a new vector. It also
can be called vector product and it is written as a × b . The way to do cross
product is finding the determinant of the matrix. For example,
a × b=|a||b| sinθ n
We can also find the direction of a , b and a × b by using Right Hand Rule.
The cross product will always be orthogonal or perpendicular to the plane which
containing the original two vectors. It also equals to the area of the parallelogram
formed by two vectors. The characteristics are shown in the picture below:
1. a × b ≠b × a
2. ( a × b ) × c ≠ a × ( b ×c )
3. a × ( b+c )=( a× b ) + ( a × c )
The table below shows the similarities and differences between dot product and
cross product:
The product of two vectors is a scalar The product of two vectors is a vector
quantity. a quantity.
For any parallel vectors, the cross product must be 0.
This is because
The dot product is defined by the relation: there product
The cross is no angle between
is defined bytwo
the vectors
relation:
b and sin 0=0. Therefore, a × b=0.
a ∙ b=|a||b|cos θ a × b=|a||b| sinθ n
The dot product obeys commutative law: The cross product does not obey
commutative law:
a ∙ b=b ∙ a
a × b ≠b × a
If two vectors are perpendicular to each If two vectors are parallel to each other, their
other, then their dot product is zero. vector product is zero.
a ∙ b=0 a × b=0
4.0 Conclusion
In short, linear algebra is the study of matrices, linear equation system and vector in
mathematics. Linear algebra also widely used in science especially physics. There are 3
types of linear equation system and also 3 solution to the system. We can solve it by
many methods such as elimination, substitution, Gaussian elimination and so on.
Besides, there are 2 types of vector multiplication which are dot product and cross
product.