0
$\begingroup$

Can you solve the following problem in mathematica program? Thank you.

Let x=(x1,x2,x3),y=(y1,y2,y3) and ⟨x,y⟩=x1y1+2x2y2+x3y3 be an inner product in a three-dimensional real vector space.

Define the function that calculates the dot product of two vectors and calculate the dot product of the vectors (−1,1,2),(3,2,−1).

Define the function that calculates the norm of a vector obtained from this dot product and calculate the norm of the vector (−1,1,2),(3,2,−1).

$\endgroup$
3
  • 3
    $\begingroup$ Welcome to Mathematica StackExchange. While we are happy to help you with your homework, you have to first show some of your work. Have you tried writing any code? Where do you get stuck? $\endgroup$
    – Domen
    Jan 2, 2022 at 9:18
  • 1
    $\begingroup$ You could start with Dot: {x1,x2,x3}.{y1,y2,y3} $\endgroup$ Jan 2, 2022 at 9:21
  • 1
    $\begingroup$ Try Norm[{a, b, c}] and also check out EuclideanDistance[{2, 3, 4}, {5, 4, 3}] as an example. $\endgroup$
    – Syed
    Jan 2, 2022 at 9:27

1 Answer 1

1
$\begingroup$
x = {x1, x2, x3};
y = {y1, y2, y3};
Dot[x, y]

v1 = {-1, 1, 2}
v2 = {3, 2, -1}
Dot[v1, v2]
Norm[v1]
Norm[v2]
Norm[Dot[v1, v2]]

enter image description here

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.