23
Recitation 1: Basics Vivek Raghuram Carnegie Mellon University [email protected] September 3, 2020 Vivek Raghuram (Section F) Recitation 1 September 3, 2020 1 / 23

Recitation 1: Basics - Carnegie Mellon

Embed Size (px)

Citation preview

Recitation 1: Basics

Vivek Raghuram

Carnegie Mellon University

[email protected]

September 3, 2020

Vivek Raghuram (Section F) Recitation 1 September 3, 2020 1 / 23

Overview

1 Introduction

2 Who Cares?

3 Vectors

4 Complex Numbers

5 Proof Techniques in a Nutshell

6 Proofs Practice!

Vivek Raghuram (Section F) Recitation 1 September 3, 2020 2 / 23

Intro

https://forms.gle/pLAMww7XE7ZSB6HF8

O�ce hours are for theory questions/homework help. You may emailme to set up an appointment if you wish.

Recitation notes and videos will be posted at:andrew.cmu.edu/user/vivekrag/21241.html.

Feel free to email me at [email protected] if you have anyquestions or concerns!

Vivek Raghuram (Section F) Recitation 1 September 3, 2020 3 / 23

Recitation Strategy

Please turn on your camera if you have one :)

I will send Google polls occasionally to gauge how things are goingwith the course.

Generally, we will spend 5-10 minutes covering theory, then the rest ofrecitation doing fun problems. We may occasionally break into groupsto work on problems together.

Vivek Raghuram (Section F) Recitation 1 September 3, 2020 4 / 23

Why do we study linear algebra?

Vectors are everywhere:

Machine Learning/Artificial Intelligence

Computer Vision

Google Pagerank algorithm (we will hopefully talk about this later)

Statistics/Data Science

Linear Optimizations

Algebraic Structures

*Future classes at CMU*

Vivek Raghuram (Section F) Recitation 1 September 3, 2020 5 / 23

2C 373

Vector Addition

Vector Addition

For vectors u = hu1, u2i and v = hv1, v2i:

u+ v = hu1, u2i+ hv1, v2i = hu1 + v1, u2 + v2i

Vivek Raghuram (Section F) Recitation 1 September 3, 2020 6 / 23

00U L 2,37 L 3,47

It 25,7

Triangle Rule

Vivek Raghuram (Section F) Recitation 1 September 3, 2020 7 / 23

L t

Parallelogram Rule

Vivek Raghuram (Section F) Recitation 1 September 3, 2020 8 / 23

e

Scalar Multiplication for Vectors

Scalar Multiplication

For an arbitrary constant k and vector u:

ku = khu1, u2i = hku1, ku2i

Vivek Raghuram (Section F) Recitation 1 September 3, 2020 9 / 23

KEIR

Subtraction of Vectors

Subtraction of Vectors

For vectors u = hu1, u2i and v = hv1, v2i:

u� v = hu1, u2i � hv1, v2i = hu1 � v1, u2 � v2i

Vivek Raghuram (Section F) Recitation 1 September 3, 2020 10 / 23

5,77 22,27 2357

Vector Properties

Vector Properties

For vectors u, v,w 2 Rn and c , d 2 R:u + v = v + u (commutativity of addition)

u + (v+w) = (u+v) + w (associativity of addition)

u + 0 = u (identity for addition)

u + (-u) = 0 (inverse for addition)

c(u+v) = cu + cv (distributivity for vector addition)

(c+d)u = cu+du (distributivity for scalar addition)

(cd)u = c(du) (associativity of scalar multiplication)

1u = u (identity for multiplication

Vivek Raghuram (Section F) Recitation 1 September 3, 2020 11 / 23

Proof of Commutativity of Addition of Vectors

Vivek Raghuram (Section F) Recitation 1 September 3, 2020 12 / 23

0 Let it be vectors in IR This means I Luni uz 437

and V LV Nz Uz We wish to show that u tv V tu

Ft LU 142,4 t LY Vz Vzu Vi Uz 1Uz UzTV3

L Vita s VztUz Uz commutativity of R

PtuO

Linear Combinations

Definition:A vector v is a linear combination of vectors v1...vk if there exist scalarsc1...ck such that:

v = c1v1 + c2v2 + ...+ ckvk

Vivek Raghuram (Section F) Recitation 1 September 3, 2020 13 / 23

OC IR

3 Lt 2,3 t 4 L 5,67

www k TzC

Dot Product

Definition:

Let u = hu1, u2, u3, ..., ani and v = hv1, v2, v3, ...vni. The dot product ofthese vectors is:

a · b = a1b1 + a2b2 + a3b3...anbn

This value is a scalar!

Vivek Raghuram (Section F) Recitation 1 September 3, 2020 14 / 23

Mmm inhume

iz

bi

Dot Product Properties

Vivek Raghuram (Section F) Recitation 1 September 3, 2020 15 / 23

F

Proof of Commutativity of Dot Product

Vivek Raghuram (Section F) Recitation 1 September 3, 2020 16 / 23

PI Let u c Rn WWTS that I P In

I J E iviil C RVilli by commutativity of multiplication

F Tf Def of product

O

Complex Numbers Example

Example2 + 3i

4� 5i

Vivek Raghuram (Section F) Recitation 1 September 3, 2020 17 / 23

conj atbi a bi at bi

2t3i Utsi 8 t wit 12 it is it

4 ST 4t5i 16 25,2St 22 i 15

16 1 25

7 22 i

Tft Eiwawbi

Proof Techniques List

Converse

Contrapositive

Contradiction

Direct Proof

(Weak) Induction

Show LHS = RHS

Prove A ✓ B and B ✓ A

Counting two ways

Proof by Exhaustion

Vivek Raghuram (Section F) Recitation 1 September 3, 2020 18 / 23

p q

q pGq 7 P is eqiu to p q

7 q p is falsestart p end q

t Bc Assume n K Snow tree for n k ti

213 3,2

Which proof technique should I use??

Work with everything you are given in a problem’s statement.

Try to outline a proof before writing.

You will gain proof writing chops as you do more math.

Vivek Raghuram (Section F) Recitation 1 September 3, 2020 19 / 23

Problem 1: Easy

Example

Prove that if 3n + 2 is odd, then n is odd.

Vivek Raghuram (Section F) Recitation 1 September 3, 2020 20 / 23

P qPf We proceed by contrapositive WWTS that if n is not odd

then is not odd Since n is not odd u must

be even n 2K K C It 3nt2 3 24 2 6kt 2

2 3kt l which is always even Since the

contrapositive and the original statement have the same

truth value we are done

O

Problem 2: MediumExample

Prove, by induction, thatnX

i=1

(2i � 1) = n2, 8n 2 Z+

Vivek Raghuram (Section F) Recitation 1 September 3, 2020 21 / 23

Pf We proceed by inductionBasecasen n l yC2i l 2 I I i

Inductivthesis suppose Cai l K

i i2k

let 1 2

We see that the claim holds thee by induction LT

Problem 3: Medium

Example

Prove that the sum of the first n odd positive integers is n2.

Vivek Raghuram (Section F) Recitation 1 September 3, 2020 22 / 23

Pfo

ziti 2 oi t I

2 ncn t n2

U2 n t n

U2O

Problem 4: Hard

Example

Prove that if 2n � 1 is prime for some integer n, then n must also be prime.

Vivek Raghuram (Section F) Recitation 1 September 3, 2020 23 / 23

Pf We proceed by contrapositive WWTS that if u 2 is not

prime then 2 l is not prime either Since n is not prince

n Xy for somXiytZ Then Zn l 2 9 I T

2 1 2T 2 21 242 2 bytheorem Some see that 2 l is a factor of 2 land 2b I I Thus the contrapositive holds 1 nel

O