Download - CPE 332 Computer Engineering Mathematics II
CPE 332CPE 332Computer Computer
Engineering Engineering Mathematics IIMathematics II
CPE 332CPE 332Computer Computer
Engineering Engineering Mathematics IIMathematics II
Chapter 1 VectorChapter 1 Vector
Web Site• http://cpe.rsu.ac.th/ut
– Download Material, Course Notes– Download Slides– Download HW/QZ+Solutions– Grading– Announcements– Resources
Today Topics
• Period 1– Course Outlines– Course Web Site– Part I Chapter 1 Vector (Review)– Breaks
• Period II– Part I Chapter 1 Vector (Review)
• Assignment: – Homework I: ส่�งส่�ปดาห์ห์น้�า ต้�นชั่��วโมงเท่ าน��น– ให้�ท่�าใน Sheet ท่��กำ�าห้นด โดย Download มาเท่ าน��น
• Next Week ต่�อ Chapter 2 เรื่��อง Matrix
CPE 332 T1-56 Wk2
Definition of Vector
Definition of Vector
Notes• เน้��องจาก Vector มี�ทั้��งขน้าดและทั้�ศทั้าง เรื่าส่ามีารื่ถ
เข�ยน้ Vector เป!น้ส่องส่�วน้ – ส่�วน้ขน้าดแทั้น้ทั้��ด�วย Scalar– ส่�วน้ทั้�ศทั้าง จะแทั้น้ทั้��ด�วย Unit Vector ทั้��มี�ทั้�ศทั้างเด�ยว
ก�บ Vector เด�มี
• การื่ก$าห์น้ดทั้�ศทั้าง อาจจะก$าห์น้ดเป!น้ Component ใน้แกน้ Coordinate (x,y,z); อาจจะก$าห์น้ดเป!น้มี&มีทั้��กรื่ะทั้$าก�บแกน้ Coordinate
• อาจจะก$าห์น้ดเป!น้ Ratio ทั้��กรื่ะทั้$าก�บแกน้ก'ได�• จะกล�าวต่�อไปภายห์ล�ง
– เรื่าจะเน้�น้ทั้��ส่องอ�น้แรื่ก คื�อก$าห์น้ดเป!น้ Component i,j,k ใน้แกน้ x,y,z
– ห์รื่�อก$าห์น้ดใน้รื่+ป Cosine ของมี&มี– ทั้��งส่องอ�น้น้��จะเก��ยวข�องก�บ Unit Vector
)coscos(cosˆˆ321 kjikjiffFFF FFFFF
Vector Operations• เน้��องจาก Vector ปรื่ะกอบด�วยทั้��งขน้าดและทั้�ศทั้าง
– พี�ชคืณิ�ต่ เช�น้ บวก ลบ คื+ณิ ห์ารื่ จะไมี�เห์มี�อน้ก�บ Scalar เน้��องจากต่�องน้$าทั้�ศทั้างมีาปรื่ะกอบการื่คื$าน้วณิด�วย
– การื่ บวก-ลบ ของ Vector จะได� Vector ให์มี�ทั้��ขน้าดและทั้�ศทั้างต่�างจากเด�มี
– การื่คื+ณิ เรื่าจะไมี�ใช�คื$าว�า ‘Multiplication’ แต่�จะใช�คื$าว�า ‘Product’ แบ�งเป!น้ส่องปรื่ะเภทั้
• Scalar Product (Dot Product; ●) จะได� Scalar• Vector Product (Cross Product; X) จะได� Vector ทั้��ต่� �ง
ฉากก�บ Vector เด�มีทั้��งส่อง
Addition and Substraction
การื่ปรื่ะย&กต่ใช�ใน้ Plane Geometry
r
Component Vector
Component Vector in Cartesian Coordinate
Addition-Subtraction using Component Vector
and Position Vector
• ด�งน้��น้การื่บวกลบ Vector เรื่าจะบวกลบจาก Position Vector และผลล�พีธ์จะได�เป!น้ Position Vector
Any vectors in Cartesian Coordinates
• Given 2 Points, P(x1,y1,z1) and Q(x2,y2,z2)– We have OP+PQ=OQ– Then PQ = OQ – OP
• PQ = x2i+y2j+z2k – x1i+y1j+z1k• PQ =(x2-x1)i+(y2-y1)j+(z2-z1)k
O
X
Y
Z
Q(x2,y2,z2)
P(x1,y1,z1)
Any vectors in Cartesian Coordinates
• Given 2 Points, P(x1,y1,z1) and Q(x2,y2,z2)– PQ =(x2-x1)i+(y2-y1)j+(z2-z1)k– Also magnitude or length of vector is
the distance between those 2 points (Euclidian Distance)• PQ = (x2-x1)2+(y2-y1)2+(z2-z1)2
O
X
Y
Z
P(x1,y1,z1)
Q(x2,y2,z2)
Direction Cosine/Ratio• Vector ส่ามีารื่ถเข�ยน้เป!น้ส่องส่�วน้ปรื่ะกอบ
– ขน้าด ส่ามีารื่ถห์าได�ง�าย กรื่ณิ� Position Vector– ทั้�ศทั้าง คื�อ Unit Vector ทั้��มี�ทั้�ศทั้างเด�ยวก�น้ก�บ
Vector น้��น้• ทั้�ศทั้าง ส่ามีารื่ถแต่กเป!น้ Component Vector บน้
แต่�ละแกน้ได�ด�วย• ทั้�ศทั้างส่ามีารื่ถก$าห์น้ดด�วยมี&มีทั้��ทั้$าก�บแต่�ละแกน้ได�ด�วย • ทั้��งส่องแบบน้�� ส่�มีพี�น้ธ์ก�น้ทั้างต่รื่�โกณิมี�ต่� โดยการื่ก$าห์น้ด
ด�วยคื�า Cosine ของมี&มี เรื่�ยก Direction Cosine
aAA ˆ
Direction Cosine• Position vector OP
– Magnitude equal to OP = x2+y2+z2
– Direction: cosi+cosj+cosk•Called Direction Cosine
We have cos=F1/OPcos=F2/OPcos=F3/OP F1
F2
F3
Direction Cosine and Direction Ratio
Direction Cosine and Direction Ratio
Example• Given points P1(2,-4,5) and P2(1,3,-2),
find the vector P1P2 and its magnitude and direction– OP1 = 2i-4j+5k and OP2 = i+3j-2k
– P1P2=OP2-OP1=-i+7j-7k
– P1P2 = 1+49+49=99
– Cos = -1/99 then = 95.8 degree– Cos = 7/99 then = 45.3 degree– Cos = -7/99 then = 134.7 degree
Direction Cosine and Direction Ratio
Scalar Product(DOT)
Scalar Product (DOT)
Scalar(Dot) Product
A
n
A●n=Acos
Scalar(Dot) Product– A●(B+C)=A●B+A●C
– Let A = a1i+a2j+a3k, B = b1i+b2j+b3k
• We have A●B = a1b1+a2b2+a3b3
– Also– Given S=ai+bj, the equation of line
perpendicular to this vector is in the form•ax+by=c
S=ai+bj
Line ax+by=c
DOT Product
Example• Find the angle between the vector
– A=i-j-k and B = 2i+j+2k
• We calculate A●B = 1.2-1.1-1.2=-1• Also A = (1+1+1)=3• Also B = (4+1+4)=3• Then Cos = -1/33
= 101.1 degrees
Vector Product (Cross)
Cross Product
3 Vector Products
Examples• Let A=2i+3j-k, B=i+j+2k
– A●B = 2+3-2 = 3– AB = (6+1)i-(4+1)j+(2-3)k=7i-5j-k– AB is orthogonal to both A and B
• Test : A●(AB) = (2i+3j-k)●(7i-5j-k) = 14-15+1=0
• Test : B●(AB) = (i+j+2k)●(7i-5j-k) = 7-5-2=0
Plane Equation in 3D• ใน้ 2D ส่มีการื่เส่�น้ต่รื่งจะมี� general Form
– Ax+By=C
• ใน้ 3D ส่มีการื่ของ Plane จะมี� General Form– Ax+By+Cz=D– D เป!น้คื�าคืงทั้�� ทั้&กๆส่มีการื่ใน้รื่+ปเด�ยวก�น้ แต่�คื�า D
ต่�างก�น้ จะเป!น้รื่ะน้าบทั้��ขน้าน้ก�น้• 3x-2y+5z = 3 จะขน้าน้ก�บ 3x-2y+5z = 6
Example 1• ก$าห์น้ดส่มีการื่ของ Plane 2x+3y+2z=5
จงห์า unit vector ทั้��ต่��งฉากก�บ Plane น้��– ก$าห์น้ด 3 จ&ด คื�อ A, B, C ด�งน้��– A: x=0,y=0,ด�งน้��น้ z=5/2 A(0,0,2.5)– B: x=1,y=0, ด�งน้��น้ z=(5-2)/2
B(1,0,1.5)– C: x=0,y=1, ด�งน้��น้ z=(5-3)/2 C(0,1,1)– Vector AB x AC จะได� Vector ทั้��ต่��งฉากก�บ
Plane
• ส่�งเกต่&ว�าทั้&กๆ Vector ทั้��เป!น้ multiple ของ 2i+3j+2k จะต่��งฉากก�บ Plane 2x+3y+2z=k เส่มีอ โดยทั้�� k เป!น้คื�าคืงทั้��ใดๆ
kjiu
kji
kji
kjki
5.125.4
1ˆ
5.1
5.110
101
5.1,
ACAB
ACAB
Example 2• จงห์าส่มีการื่ของ Plane ทั้��ต่��งฉากก�บ
Vector 3i-2j-k และก$าห์น้ดให์�จ&ด (1,1,2) อย+�บน้ Plane น้��น้– จากต่�วอย�างก�อน้ เรื่าได�ส่มีการื่ของ Plane เป!น้
3x-2y-z= k– เรื่าห์าคื�า k โดยแทั้น้คื�าจ&ด (1,1,2) ลงใน้ส่มีการื่
ด�งน้�� 3(1)-2(1)-(2)=-1=k– ด�งน้��น้ส่มีการื่ทั้��ต่�องการื่จะเป!น้ 3x-2y-z+1=0
HW for Chapter 1 ส่ งอาท่�ต้ย�ห้น�า
ให้�น�กำศึ�กำษา Download กำารบ้�าน 1 ส่�าห้ร�บ้บ้ท่ท่�� 1 จากำน��นท่�ากำารบ้�านลงใน Sheet ท่�� Download มา• จะไม ร�บ้งานท่��เขี�ยนลงบ้นกำระดาษอ&�น• กำารบ้�านส่ งต้�นชั่��วโมงเท่ าน��น
ให้�น�กำศึ�กำษา Download กำารบ้�าน 1 ส่�าห้ร�บ้บ้ท่ท่�� 1 จากำน��นท่�ากำารบ้�านลงใน Sheet ท่�� Download มา• จะไม ร�บ้งานท่��เขี�ยนลงบ้นกำระดาษอ&�น• กำารบ้�านส่ งต้�นชั่��วโมงเท่ าน��น