30
21
The sum, difference and inner
product of two vectors
The sum and difference of two vectors in 3-dimensional space is obtained by adding and
subtracting their respective components.
For example, for
,
,
The inner product is defined:
Program
?→ A:?→ B:?→ C:A → X:B → Y:C → M:?→ A:?→ B:?→ C:A + X
→ A:B + Y → B:C + M → C:A
B
C
2 X - A → A:2 Y - B → B:2 M
- C → C:A
B
C
(X - A)
X +(Y - B)Y +(M - C)
M → D:D <
111 STEP
>
INPUT
A
,
B
,
C
(first time) :
A
,
B
,
C
(second time):
OUTPUT
A
,
B
,
C
(first time) : sum of two vectors
A
,
B
,
C
(second time): difference of two vectors
D
: inner product
Execution Example:
For
and
,
, ,
α
a b
c
, ,
(
)
=
→
β
a
′
b
′
c
′
, ,
(
)
=
→
β
β
α
α
β
α
α β
+
a b c
, ,
(
)
a
′
b
′
c
′
, ,
(
)
+
a a
′
+
b b
′
+
c c
′
+
,
,
(
)
=
=
→
→
α β
–
a b c
, ,
(
)
a
′
b
′
c
′
, ,
(
)
–
a a
′
–
b b
′
–
c c
′
–
,
,
(
)
=
=
→
→
α β
⋅
α β
θ
cos
aa
′
bb
′
cc
′
+
+
=
=
→
→
→
→
α
a b c
, ,
(
)
=
→
β
a
′
b
′
c
′
, ,
(
)
=
→
α β
⋅
→
→
α
1
2 3
, ,
(
)
=
→
β
2 8
3
–
, ,
(
)
=
→
α β
+
3
1
0 0
,
,
(
)
=
→
→
α β
–
1
–
6
–
6
,
,
(
)
=
→
→
α β
⋅
9
=
→
→
Prog
1
S A
D R
P1
P1 P2 P3 P4
G
関数電卓事例集
.book 30
ページ
2002年9月2日 月曜日 午後6時51分
Summary of Contents for 3950P
Page 1: ......
Page 46: ...MEMO MEMO MEMO MEMO...
Page 47: ...Authors Dr Yuichi Takeda Research and Development Initiative Chuo University...
Page 48: ......