Download as pdf or txt
Download as pdf or txt
You are on page 1of 19

1

MATHEMATICS FOR DATA SCIENCE II

WEEK 3

Topics covered in week 2

o Some properties of determinants


o Solutions for a system of linear equations
 Cramer's rule

where Axi represents the matrix obtained from A by replacing its ith column by the vector b.

 Using inverse of a matrix

where 𝑎𝑑𝑗(𝐴) = transpose of cofactor matrix.

Consider a system of linear equations 𝐴𝑥 = 𝑏 where 𝐴 is an invertible matrix. Then


solution of the system of linear equations can be obtain as follows:

Step 1: Find the inverse of the matrix A.


Step 2: Find the matrix multiplication of A−1 with b, i.e. A −1b which is a column
matrix.
Step 3: Compare with the column matrix x and find the value of x 1, x2, . . .,xn.

Instructor: Dr. Lavanya S


2

 Row reduction
 Row echelon form:

 Reduced row echelon form:

 Dependent and independent variables

Dependent variable - column containing leading entry

Independent variable - column not containing any leading entry

 Guassian elimination method


Step 1: Write the system of linear equations in the form Ax=b (where A is an mxn
matrix) and form the augmented matrix [A|b]
Step 2: Perform elementary row operations on [A|b] so that A is converted to the
RREF form

Instructor: Dr. Lavanya S


3

Step 3: After obtaining the reduced row echelon form the matrix [A|b], let R be the
submatrix of the obtained matrix of the first n columns and c be the submatrix of the
obtained matrix consisting of the last column. We can write reduced row echelon form
of [A|b] to [R|c].
Step-4: Form the corresponding system of linear equations Rx = c.
Step-5: Find all the solutions of Rx = c. These are also the solutions of Ax = b.

Augumented matrix [A|b]

converted to which is of the form [Rx|c]

(fixed values or it depends on the independent


variable)

Instructor: Dr. Lavanya S


4

TOPICS TO BE COVERED IN WEEK 3

 Motivation for Vector Spaces


 Vector Spaces
 Properties of Vector Spaces
 Subspaces
 Linear combination
 Linear dependence Note: Please don't confuse linear dependence and independence with
dependent and independent variable
 Linear Independence
S is Closed under addition if addition of any two elements of S is also in S.

Motivation for vector spaces:

Consider a system of linear equations Ax = b. We have seen a few ways of identifying


solutions of this system. Let S = {x ϵ Rn | Ax = 0}. That is, S is the set of all solutions of the
system Ax = 0.

What do we know about S?

 S is always _____________ and it contains the _______ vector.


 S is either a ____________ set or it contains ________________________ elements.

Let us assume the case when S is an infinite set. Observe that

(1) if v1, v2 ϵ S, then v1 +v2 ϵS. (Closed under addition)

(2) if αϵR and v1 ϵ S, then αv1ϵS. (Closed under scalar multiplication)

Exercises: Closed under vector addition and scalar multiplication

a) S = { (x, 0) : x ϵ R}
closed under addition and
scalar multiplication

b) S = {(x , y, 1) : x, y ϵ R}
not closed under addition and scalar multiplication

c) S = {(x,y) ϵ R2: x+y = 1}

not closed under addition and scalar


multiplication
d) S= {(x,y,z)ϵ R3 : x+y+z = 0}

closed under addition and scalar multiplication


Instructor: Dr. Lavanya S
5

Equivalently, if v1 and v2 are in S then α1v1 + α2v2 is also in S, where α1 and α2 are real
numbers. We call α1v1 + α2v2 a linear combination of v1 and v2. In more general, if v1, v2, .
. . , vn ∈ S and α1, α2, . . . , αn ∈ R, then α1v1 + α2v2 + · · · + αnvn ( linear combination of v1,
v2, . . . , vn) is also in S.

Roughly, we can think of a vector space V as a collection of objects that behave similar to
the vectors in the set S. We can perform two operations on V ;

• We can add the elements of V .

• We can multiply scalars (α ∈ R) with the elements of V . These operations should satisfy
a few conditions, the axioms for a vector space.

Properties of vectors in R2

(1,2)
v1

v3 v2 (2, 1)
(-1, 1)

v1= v2= v3=

Instructor: Dr. Lavanya S


6

v1+v2 = v2+ v1= Commutative (addition)

(v1+v2)+v3 = v1+(v2+v3) = Associative(addition)

Let v be any vector in R2.


Find a vector such that when it is added to v, the sum is still v.
Zero vector - identity
v + __ = v
Find a vector such that when it is added to v, the sum is the zero vector.
v + __ = 0 (what is 0 here?) additive inverse

1(v1) =

2(3v1) = (2.3)v1 = (associative - scalar multiplication)

2(v1 + v2) = 2.v1+ 2.v2=


Distributive properties
(2+3).v1 = 2.v1+ 3.v1 =

Vector Spaces

Always first check additive and multiplicative closure

that satisfies the following conditions:

Note: It is also represented as (V ; +; ·; R)

If there is no additive identity, we cannot define an additive inverse.

Instructor: Dr. Lavanya S


7

Note: Every vector space has the zero element.

• To prove a set is a vector space, we need to verify additive and multiplicative closure
and all the other axioms given above.

• If just one of the vector space axiom fails to hold, then V not a vector space.

• Zero element 0V of a vector space V is always unique. • The real number 0 ∈ R and the
zero vector 0V of a vector space V are commonly denoted by the symbol 0. One can
always tell from the context whether 0 means the zero scalar (0 ∈ R) or the zero vector
(0V ∈ V ).

• It is standard to suppress · and only write au instead of a · u.

A vector is an element of a vector space.

Examples:

1) Rn

Instructor: Dr. Lavanya S


8

2) The set of all m×n matrices with real entries, Mm×n

HW: verify the other axioms

3) Solutions of a Homogeneous system Ax=0 where A is an m×n matrix. (i.e. a system


with m equations and n variables)

HW: Verify the other axioms

Note: This space is a subset of Rn and hence is a subspace of Rn.

4) Let V = R2 = {(x1, x2) | x1, x2 ∈ R}, and the addition and scalar multiplication on V are
defined as follows:

Closed under addition and scalar multilplication

V is not commutative w.r.t addition and hence not a vector space

Instructor: Dr. Lavanya S


9

5) Consider the set V = {(x, 1) | x ∈ R}. The addition and scalar multiplication on V is
defined as follows:

Closed under addition and scalar multiplication

Check whether V is a vector space or not with respect to the given operations.

Instructor: Dr. Lavanya S


Suppose V={(x, y) : x+ y =1} = {(x, 1-x) x in R} 10

We will check if there is a vector (a, b) such that for an arbitrary vector (x1,x2) in R2,

There is no additive identity. So (iii) fails.

hence (iv) also fails.

hence (v) fails

Closed under addition and scalar multiplication

Instructor: Dr. Lavanya S


11

V1 is not a vector space since it is not commutative (w.r.t. addition)

V2 is not a vector space since it is not commutative.

V3 has no additive identity and hence it is not a vector space.

Instructor: Dr. Lavanya S


12

HW: Consider the set V = R2 = {(x, y) | x, y ∈ R}. The addition and scalar multiplication on
V are defined as follows:

Prove that V is a vector space.


Exercise: Assuming that V is vector space, find the identity element.

Note: You can see that (0, 0) is not always a zero vector of R 2. The zero vector is an
element of the set you are working with which satisfies the corresponding axioms

Instructor: Dr. Lavanya S


13

Instructor: Dr. Lavanya S


14

Properties

Suppose there are two vectors and satisfying the axiom (iii)

Instructor: Dr. Lavanya S


15

Subspaces
A non-empty subset W of a vector space V is called a subspace of V if W is a vector space
under the operations addition and scalar multiplication defined in V.

To show that a non-empty set W is a vector subspace, one doesn’t need to check all the
vector space axioms.

Conditions for a subspace:


If W is a non-empty subset of a vector space V , then W is a subspace of V if and only if
the following conditions hold (1) If w1 and w2 are in W , then w1 + w2∈ W .
(2) For all c ∈ R and for all w1 ∈W , c · w1∈ W .
A subspace W of a vector space V is called a proper subspace if W ⊊ V.

X= {1, 2, 3}. Trivial subsets = ,X


Note:
Every vector space V over R has two trivial subspaces:
• V itself is a subspace of V .
• The subset consisting of the zero vector {0V} of V is also a subspace of V.

Examples:
1) Check whether W = {(x, y) | x + y = 0} ⊂ R2 is a vector subspace of V = R2 or not.

W is closed under addition and scalar multiplication.

Instructor: Dr. Lavanya S


16

Geometrically, the set W represents a straight line in R2. The geometrical representation
of W is given below.

From the above graph, it is clear that the line L passes through the origin. In general, a
line in R2 is a subspace of R2 if and only if it passes through the origin.
Note: The non-trivial subspaces of R2 are given by the straight lines passing
through origin.
2)Consider the parabola W = {(x, y) | y = x2} ⊂ V = R2. We want to check whether W is a
vector subspace of V or not.

Not closed under addition

Not closed under scalar multiplication.

Hence W is not a vector subspace of R2.

Instructor: Dr. Lavanya S


17

3) Check whether the set W = {A ∈ M2×2(R) | A = AT } of all 2 × 2 real symmetric matrices is


a subspace of M2×2(R) or not with standard addition and scalar multiplication.

W is closed under addition and scalar multiplication and hence is a subspace

4) Check whether the set W of 2 × 2 invertible matrices with real entries with standard
addition and scalar multiplication is a subspace of M 2×2(R) or not.

It is not closed under addition.

W is not a subspace.

5) Show that W = {(0, y, z) : y, z ∈ R} is a subspace of real vector space R3, where R3 is a


vector space with respect to the usual addition and scalar multiplication.

Instructor: Dr. Lavanya S


18

6) Show that the plane W = {(x, y, z) | x + y + z = 1} ⊂ R3 is not a vector subspace of R3,


where R3 is a vector space with respect to the usual addition and scalar multiplication .

If we are considering usual addition and scalar multiplication, then the origin
should be there in the subspace.

Here (0,0,0) does not belong to W. Hence W is not a subspace.

7) Let W = {(x, y, z) | x ≥ z} be a subset of the vector space R 3 (with respect to the usual
addition and scalar multiplication). Then show that W is not a vector subspace of R3.

Let us consider the vector (1, 0, 0). It is en element of W.

-1(1, 0, 0) = (-1, 0 , 0) is not element of W.

W is not closed under scalar multiplication.

Instructor: Dr. Lavanya S


19

Write down all possible subspaces of R 2 and R3.

: R3, {0}

All lines passing through origin


All planes passing through origin.

Take any two subspaces W1 and W2 of V. W1 W2 always contains the zero


vector.

Instructor: Dr. Lavanya S

You might also like