0% found this document useful (0 votes)
3 views98 pages

2module 2

The document covers vector operations, including examples of vector addition and subtraction, as well as the concepts of dot product, cross product, and triple product. It also discusses the del operator, gradient, divergence, and curl, along with matrix operations such as addition, multiplication, and types of matrices. Homework problems are provided throughout to reinforce understanding of these concepts.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views98 pages

2module 2

The document covers vector operations, including examples of vector addition and subtraction, as well as the concepts of dot product, cross product, and triple product. It also discusses the del operator, gradient, divergence, and curl, along with matrix operations such as addition, multiplication, and types of matrices. Homework problems are provided throughout to reinforce understanding of these concepts.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Module 2

Vector Operations
Vector Operations

Example: Two vectors of equal magnitude 5 units have an angle of 60°


between them. Find the magnitude of (a) the sum of the vectors and (b) the
difference of the vectors.
Vector Operations
Example: Suppose a small ball is moving inside a long tube at a speed 3 m/s and the tube
itself is moving in the room at a speed 4 m/s along a direction perpendicular to its length.
In which direction and how fast is the ball moving as seen from the room?
Vector Operations
Home Work: Find the resultant of the three vectors shown in figure.

Home Work: The magnitudes of


vectors OA, OB and OC in figure are
equal. Find the direction of OA + OB -
OC
Vector Operations

The angle between the force and the


displacement is 180°. Thus, the work
done is negative.
Vector Operations
Dot Product of Two Vectors in terms of the Components along the
Coordinate Axes:
Vector Operations
Vector Operations
Vector Operations
Cross Product of Two Vectors in terms of the Components along the
Coordinate Axes:
Vector Operations
Vector Operations
Vector Operations
Vector Operations
Vector Operations
Triple product: Since the cross product of two vectors is a vector, it can be
dotted and crossed to form a triple product.

Scalar triple product: If we take a dot product with the resultant of vectors
B and C with another vector A.
Vector Operations
Triple product properties: (1) The scalar triple product is unchanged
under the circular shift of vectors A, B, and, C.
Vector Operations

The simple product of two triple products (or the square of a triple product),
may be expanded in terms of dot products:
Vector Operations

Problem: Prove the BAC-CAB rule by writing out both sides in component
form.

Home Work: Prove that


Del Operator
Gradient
Ordinary Derivative
Suppose, we have the function of one variable: f(x). What does the derivative,
df/dx, do for us?
Answer: It tells us how rapidly the function f(x) varies when we change the
argument x by a tiny amount, dx:
df = (df/dx)dx
In words: If we change x by an amount dx, then f changes by an amount df; the
derivative is the proportionality factor.

The derivative df/dx is the slope of the graph of f versus x.


Gradient
The derivative is supposed to tell us how fast the function varies as studied
previously in 1-D.
What will be the scenario if your function depends on three coordinates, e.g.,
temperature T (x,y,z) in room
A theorem on partial derivate
Gradient
Like any other vector, gradient also has magnitude and direction. Let us
look at the geometrical meaning of gradient.

If we fix |dI| (magnitude of length vector) then the maximum change in


T occurs when θ = 0, i.e., dT is greatest when I move in the same
direction as gradient T.
Gradient
Numerical Problem
Find the gradient of r = SQRT(x2 + y2 + z2)
Gradient
Numerical Problem
Gradient
Home Work: Calculate the gradients of given functions.
Divergence

The gradient has the formal appearance of a vector (i.e., del operator)
multiplying a scaler T.

The del is not a vector in the usual sense, and it is without specific meaning
until we provide it with a function to act upon. To be precise, we should say
del is vector operator that acts upon T, not a vector that multiplies T.
Divergence
From the definition of del operator, we can construct the
divergence

The divergence of a vector function is itself a scalar. You cant have the
divergence of the scaler, i.e., it is meaningless.
Divergence
Geometrical Interpretation
The name divergence is well chosen as it measures of much the vector v spreads
out (diverges) from the reference point in question.
Divergence
Numerical Problems
Calculate the divergence of these functions..
Divergence
Numerical Problems
Home Work: Estimate the divergence of the given functions.
Curl
Again, from the definition of del, we can
construct the curl

NOTE: Curl of a vector function V is, like any cross product, a


vector. You can not have the curl of scaler function; that is
meaning less
Curl
Geometrical Interpretation
The name curl is also well chosen as it measure of how much the
vector v curls around the point in question.

The functions, which are shown here, have a substantial curl.


Curl
Numerical Problem
Calculate the curl of given functions.
Va = -yX + xY & Vb = xY
Curl
Home work: Calculate the curl of given functions.
Matrix
A matrix is a rectangular arrangement of numbers into rows and columns. For
example, matrix has two rows and three columns.

A matrix having m rows and n


columns is called a matrix of order
m × n or simply m × n matrix (read
as an m by n matrix). So referring to
the above example of matrices, we
have A as a 2 × 3 matrix, and A has 2
× 3 = 6 elements.
Matrix
Example 1: If a matrix has 8 elements, what are the possible orders it can have?
We know that if a matrix is of order m × n, it has mn elements. Thus, to find
all possible orders of a matrix with 8 elements, we will find all ordered pairs
of natural numbers, whose product is 8. Thus, all possible ordered pairs are
(1, 8), (8, 1), (4, 2), (2, 4).
Hence, possible orders are 1 × 8, 8 ×1, 4 × 2, 2 × 4

In general, a 3 × 2 matrix is given by


Matrix
Different types of matrix
(1) Column Matrix: A matrix is said to be a column matrix if it has only one
column.

A is a column matrix
of order 4 × 1.

(2) Row Matrix: A matrix is said to be a row matrix if it has only one row.

B is a row matrix of
order 1 × 4.
Matrix
Different types of matrix
(3) Square Matrix: A matrix in which the number of rows are equal to the
number of columns, is said to be a square matrix. Thus an m × n matrix is said
to be a square matrix if m = n and is known as a square matrix of order ‘n

A is a square
matrix of order 3.

(4) Diagonal Matrix: A square matrix B = [bij]m × m is said to be a diagonal


matrix if all its non-diagonal elements are zero, that is a matrix B = [bij]m × m is
said to be a diagonal matrix if bij = 0, when i ≠ j.

A, B, and C are the diagonal matrix of order 1, 2, and 3.


Matrix
Different types of matrix
(5) Scaler Matrix: A diagonal matrix is said to be a scalar matrix if its diagonal
elements are equal, that is, a square matrix B = [bij]n × n is said to be a scalar
matrix if
bij = 0, when i ≠ j
bij = k, when i = j, for some constant

A, B, and C are the scaler matrix of order 1, 2, and 3.


Matrix

A, B, and C are the identity matrix of order 1, 2, and 3. Observe that a


scalar matrix is an identity matrix when k = 1. Every identity matrix is
clearly a scalar matrix but not all scaler matrix are identity matrix.
Matrix
Different types of matrix
(7) Zero Matrix: A matrix is said to be zero matrix or null matrix if all its
elements are zero

(8) Rectangular Matrix: A rectangular matrix is a matrix in which the


number of rows is NOT equal to the number of columns.
Matrix
Equality of matrix: Two matrices A = [aij] and B = [bij] are said to be equal if
(i) they are of the same order
(ii) each element of A is equal to the corresponding element of B, that is aij =
bij for all i and j.

Sol: As the given matrices are equal, therefore, their corresponding elements
must be equal. Comparing the corresponding elements, we get
Matrix
Sum of two matrix

This new matrix is the sum of the


above two matrices. We observe
that the sum of two matrices is a
matrix obtained by adding the
corresponding elements of the given
matrices. Furthermore, the two
matrices have to be of the same
order.
Matrix
Difference of two matrix

We observe that the difference of two matrices is a


matrix obtained by subtracting the corresponding
elements of the given matrices.
Matrix
Matrix
Properties of matrix addition

(i) Commutative Law: If A = [aij], B = [bij] are matrices of the same order,
say m × n, then A + B = B + A.

(ii) Associative Law: For any three matrices A = [aij], B = [bij], C = [cij] of
the same order, say m × n, (A + B) + C = A + (B + C).

(iii) Existence of additive identity: Let A = [aij] be an m × n matrix and O be


an m × n zero matrix, then A + O = O + A = A. In other words, O is the
additive identity for matrix addition.

(iv) The existence of additive inverse: Let A = [aij] m × n be any matrix, then
we have another matrix as – A = [– aij] m × n such that A + (– A) = (– A) +
A= O. So – A is the additive inverse of A or negative of A.
Matrix
Matrix Multiplication: Firstly, we
can multiply the matrix by a scalar A,
it means k A where k is the scaler.

Matrix Division: We can also divide


the matrix A by a scalar.

Multiply each element of the


matrix by the scaler Divide each element of the matrix
by the scaler
Matrix
Matrix Multiplication: For the multiplication of two matrices A and B, the
number of columns in A should be equal to the number of rows in B.
Furthermore, to get the elements of the product matrix, we take rows of A and
columns of B, multiply them element-wise, and take the sum. Formally, we
define the multiplication of matrices as follows.
Matrix
For matrix multiplication:
Number of columns in first
matrix must be equal to
number of rows in the second
matrix.

In the case of the multiplication


of A with B, A has 2 columns
while B has 3 rows. Hence, the
number of columns of A not
equal to the number of rows of B.
AB is not defined.

While BA is possible.
Matrix

If AB is defined, then BA need not be defined. In the above example, AB is


defined but BA is not defined because B has 3 columns while A has only 2
(and not 3) rows. If A and B are, respectively m × n, k × l matrices, then both
AB and BA are defined if and only if n = k and l = m. In particular, if both A
and B are square matrices of the same order, then both AB and BA are
defined.
Matrix

In the above example, both AB and BA are of different order and so AB ≠ BA.
But one may think that perhaps AB and BA could be the same if they were of
the same order. But it is not so, here we give an example to show that even if
AB and BA are of the same order they may not be the same.
Matrix
Matrix
The multiplication of matrices possesses the following properties
1. The associative law: For any three matrices A, B, and C. We have (AB)
C = A (BC), whenever both sides of the equality are defined.

2. The distributive law: For three matrices A, B, and C.


(i) A (B+C) = AB + AC
(ii) (A+B) C = AC + BC

3. The existence of multiplicative identity For every square matrix A, there


exists an identity matrix of the same order such that IA = AI = A.

Homework: Verify these properties with the help of


appropriate matrices.
Matrix
Homework: The matrices A and B are given below. Estimate AB and BA.
Matrix
Transpose of Matrix: If A = [aij] be an m × n matrix, then the matrix
obtained by interchanging the rows and columns of A is called the transpose of
A. Transpose of the matrix A is denoted by A′ or (AT ). In other words, if A =
[aij]m × n, then A′ = [aji]n × m.
For example:

Properties of the transpose of the matrices: The transpose of matrices has


some properties, and these properties can be verified by taking suitable
examples.
For any matrices A and B of suitable orders, we have
(i) (A′)′ = A
(ii) (kA)′ = kA′ (where k is any constant)
(iii) (A + B)′ = A′ + B′
(iv) (A B)′ = B′ A′

Homework: Verify these properties using the appropriate matrices.


Matrix
Symmetric Matrix: A square A = [aij] is said to be symmetric if A′ = A,
that is, [aij] = [aji] for all possible values of i and j.

For example:

Skew-symmetric Matrix: A square matrix A = [aij] is said to be a skew-


symmetric matrix if A′ = – A, that is aji = – aij for all possible values of i and
j.

For example:

If a matrix is skew-symmetric, then aii = -aii = 0, i.e., all the diagonal


elements of a skew-symmetric matrix are 0.
Matrix
Theorem 1: For any square matrix A with real number entries, A + A′ is a
symmetric matrix and A – A′ is a skew-symmetric matrix.
Prof: Let B = A + A′, then
Matrix
Theorem 2: Any square matrix can be expressed as the sum of a symmetric
and a skew-symmetric matrix.
Prof: Let A be a square matrix, then we can write
Matrix
Invertible Matrix
If A is a square matrix of order m × m, and if there exists another square
matrix B of the same order m × m, such that AB = BA = I, then, A is said to
be an invertible matrix and B is called the inverse matrix of A and it is
denoted by A–1.

A rectangular matrix does not possess its inverse, since for the products
BA and AB to be defined and to be equal, matrices A and B must be square
matrices of the same order.
Matrix
Matrix transformation

(1) The interchange of any two rows or two columns.

(2) The multiplication of the elements of any row or column by a non-zero


number.
Matrix
(3) The addition to the elements of any row or column, the corresponding
elements of any other row or column multiplied by any non zero number.
Inverse of Matrix
We can use various methods to find the inverse of a given matrix. Some of the
methods are listed below.

Gauss-Jordan Method (Elementary row operations)


Gauss Elimination Method
Adjoint/Determinant Method
Inverse of Matrix
Inverse of Matrix using Elementary Row Operations (Gauss-Jordan Method)
R1 = R1+ R2
3 0 2 1 0 0 5 0 0 1 1 0

2 0 -2 0 1 0 2 0 -2 0 1 0

0 1 1 0 0 1 0 1 1 0 0 1

A I

1 0 0 0.2 0.2 0 1 0 0 0.2 0.2 0

1 0 -1 0 0.5 0 2 0 -2 0 1 0

0 1 1 0 0 1 0 1 1 0 0 1

R2 = R2/2 R1 = R1/5
Inverse of Matrix
Inverse of Matrix using Elementary Row Operations (Gauss-Jordan Method)

1 0 0 0.2 0.2 0 1 0 0 0.2 0.2 0

0 0 -1 -0.2 0.3 0 0 1 0 -0.2 0.3 1

0 1 1 0 0 1 0 1 1 0 0 1

R2 = R2-R1 R2 = R2+R3

1 0 0 0.2 0.2 0

0 1 0 -0.2 0.3 1

0 0 1 0.2 -0.3 0

R3 = R3-R2
Inverse of Matrix
Inverse of Matrix using Adjoint/Determent Method )
We need to determine the adjoint of the matrix (adj(A)) and determent of
matrix A (det A).

Homework: workout on the determent of fourth order matrix.


Inverse of Matrix
Inverse of Matrix using Adjoint/Determent Method )
Inverse of Matrix

The adjoint of a square matrix A = [aij]n×n is defined as the transpose of the


matrix [Aij]n×n, where Aij is the cofactor of the element aij. In other words, the
transpose of a cofactor matrix of the square matrix is called the adjoint of the
matrix.

Inverse of the matrix can also be calculated using


Inverse of Matrix
Calculate the adjoint of the given matrix.
Inverse of Matrix
Homework: Find the inverse of the given matrix A using adjoint and
determent of the matrix.
System of Linear Equations
System of Linear Equations
System of Linear Equations
Gauss Jordan Method is a little modification of the Gauss Elimination
Method. Here, during the stages of elimination, the coefficients are eliminated
in such a way that the systems of equations are reduced to a diagonal matrix.
System of Linear Equations
A system of linear equations can be solved using the matrix inversion operation
Let the equations be
•All the variables in the equations should be written
in the appropriate order.
•The variables, their coefficients, and constants are
to be written on the respective sides.

•Matrix A: which represents the


variables
•Matrix B: which represents the
constants
System of Linear Equations
Example: Solve the following
equations by matrix inversion
System of Linear Equations
Example: Solve the following equations by matrix inversion
System of Linear Equations

Homework: Solve the following using the matrix method


2x1 + x2 + 2x3 + x4 = 6
6x1 - 6x2 + 6x3 + 12x4 = 36
4x1 + 3x2 + 3x3 - 3x4 = – 1
2x1 + 2x2 - x3 + x4 = 10
Matrix
Eigenvalue and Eigenvectors
Matrix
Characteristic equation & Eigen Value
Matrix
Characteristic equation
Matrix
Characteristic equation: Problem 1
Matrix
Characteristic equation: Problem 2

To find the eigenvalues:


Matrix
Characteristic equation: Problem 3

The eigenvalues are 1, -2, and 3.


Matrix
Characteristic equation: Problem 3
Eigenvector: To get the
eigenvector we have to
solve the equation,
(A-λI) X = 0
Matrix
Characteristic equation: Problem 3
Python Programing
Vector Python: horizontal and vertical vectors
Python Programing
Vector Python: Display a vector
Python Programing
Vector Python: Display three vectors
Vector: Computers
Vector Python: add and subtract two vectors
Vector: Computers
Vector Python: dot and cross product of two vectors.
Vector: Computers
Vector Python: dot product of two vectors using for loop

Syntax for loop


Vector: Computers
Vector Python: cross product of two vectors>manual
method.
Vector: Computers
Vector Python: How to calculate and display the curl of a
given function.
Vector: Computers
Vector Python: How to display the curl of the given
function.
Matrix: Computers
Matrix Python: built a matrix in Python, and component
of matrix
Matrix: Computers
Matrix Python: Sum of two matrices in Python.

Using the same method, we can determine the difference between the two
matrices. Only use a minus sign instead of a plus sign.
Matrix: Computers
Matrix Python: Multiplication of two matrices in Python.

Home Work: Write


your code for matrix
multiplication for 3
and 4th order matrix
Matrix: Computers
Matrix Python: Transpose and inverse of a matrix in the
Python.
Scaler and Vector
Scalar Vector
Scalar quantity has only magnitude, but Vector quantity has both magnitude
no direction and direction.

Scalar quantities follow the rules of Vector quantity follows the rules of
ordinary algebra. vector algebra.

Divison of scalar with scalar is Division between the vectors is


not permitted.
permitted.

Example: Mass, length, and energy Example: Force, displacement,


and weight etc.
etc.

You might also like