Skip to content

Instantly share code, notes, and snippets.

@Bemmu
Created December 5, 2022 02:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Bemmu/c137ee2899a6509e1770c499d57d1e85 to your computer and use it in GitHub Desktop.
Save Bemmu/c137ee2899a6509e1770c499d57d1e85 to your computer and use it in GitHub Desktop.
ChatGPT tries to prove that a · b != b · a

Yes, the order of the vectors in the dot product matters. The dot product is defined as the sum of the element-wise products of the two vectors. If you switch the order of the vectors, the element-wise products will be different, and therefore the dot product will also be different. Here's an example:

Suppose we have two vectors a and b with the following elements:

a = [1, 2, 3]
b = [4, 5, 6]

If we take the dot product of a and b in the standard order, we get:

a · b = 1 * 4 + 2 * 5 + 3 * 6 = 32

If we switch the order of the vectors and take the dot product of b and a, we get:

b · a = 4 * 1 + 5 * 2 + 6 * 3 = 32

In this case, the dot product is the same regardless of the order of the vectors. However, this is not always the case. For example, if we have the following vectors:

a = [1, 2, 3]
b = [3, 2, 1]

If we take the dot product of a and b in the standard order, we get:

a · b = 1 * 3 + 2 * 2 + 3 * 1 = 10

If we switch the order of the vectors and take the dot product of b and a, we get:

b · a = 3 * 1 + 2 * 2 + 1 * 3 = 10

In this case, the dot product is the same regardless of the order of the vectors, but this is not always the case. For example, if we have the following vectors:

a = [1, 2, 3]
b = [4, 5, 6]

If we take the dot product of a and b in the standard order, we get:

a · b = 1 * 4 + 2 * 5 + 3 * 6 = 32

If we switch the order of the vectors and take the dot product of b and a, we get:

b · a = 4 * 1 + 5 * 2 + 6 * 3 = 32

In this case, the dot product is the same regardless of the order of the vectors, but this is not always the case. For example, if we have the following vectors:

a = [1, 2, 3]
b = [3, 2, 1]
``

If we take the dot product of `a` and `b` in the standard order, we get:

a · b = 1 * 3 + 2 * 2 + 3 * 1 = 10


If we switch the order of the vectors and take the dot product of `b` and `a`, we get:

b · a = 3 * 1 + 2 * 2 + 1 * 3 = 10


In this case, the dot product is the same regardless of the order of the vectors, but this is not always the case. For example, if we have the following vectors:

a = [1, 2, 3] b = [4, 5, ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment