How can I measure the difference/similarity between two vectors?
$begingroup$
How can I measure the difference/similarity of two vectors?
That is...Let us suppose that I have two vectors in R^3: v1 = {1,8,3} v2 = {2,5,10} Let us consider that v1 and v2 are representing directions.
I would like to measure how much v1 and v2 are pointing to the same direction.
vector-spaces
$endgroup$
migrated from mathoverflow.net Feb 1 at 16:01
This question came from our site for professional mathematicians.
|
show 1 more comment
$begingroup$
How can I measure the difference/similarity of two vectors?
That is...Let us suppose that I have two vectors in R^3: v1 = {1,8,3} v2 = {2,5,10} Let us consider that v1 and v2 are representing directions.
I would like to measure how much v1 and v2 are pointing to the same direction.
vector-spaces
$endgroup$
migrated from mathoverflow.net Feb 1 at 16:01
This question came from our site for professional mathematicians.
2
$begingroup$
Look up the dot product.
$endgroup$
– Wojowu
Feb 1 at 15:09
1
$begingroup$
In the sapiens vector space, one can use the Myers-Brigg personality test.
$endgroup$
– usul
Feb 1 at 15:15
1
$begingroup$
If the main concern is the similarity of the direction of the vectors I would normalise before taking the inner-product, so take $frac{langle v_{1},v_{2}rangle}{|v_{1}||v_{2}|}=cos(theta)$ where $theta$ is the angle between the two vectors.
$endgroup$
– Floris Claassens
Feb 1 at 16:22
1
$begingroup$
Thank you for your suggestions. I forgot to mention that I would like to find a measure tht is able to capture the fact that an angle of 180 degrees would produce the maximum difference. I have found the cosine similarity, but it seems that this measure assumes that maximaly different vectors have 90 degress between them.
$endgroup$
– Zaratruta
Feb 1 at 16:33
$begingroup$
$langle v_1,v_2rangle |v_1times v_2|$ will be proportional to $sin2theta$. Normalize first, as @FlorisClaassens suggests.
$endgroup$
– amd
Feb 1 at 18:23
|
show 1 more comment
$begingroup$
How can I measure the difference/similarity of two vectors?
That is...Let us suppose that I have two vectors in R^3: v1 = {1,8,3} v2 = {2,5,10} Let us consider that v1 and v2 are representing directions.
I would like to measure how much v1 and v2 are pointing to the same direction.
vector-spaces
$endgroup$
How can I measure the difference/similarity of two vectors?
That is...Let us suppose that I have two vectors in R^3: v1 = {1,8,3} v2 = {2,5,10} Let us consider that v1 and v2 are representing directions.
I would like to measure how much v1 and v2 are pointing to the same direction.
vector-spaces
vector-spaces
asked Feb 1 at 15:04
ZaratrutaZaratruta
1112
1112
migrated from mathoverflow.net Feb 1 at 16:01
This question came from our site for professional mathematicians.
migrated from mathoverflow.net Feb 1 at 16:01
This question came from our site for professional mathematicians.
2
$begingroup$
Look up the dot product.
$endgroup$
– Wojowu
Feb 1 at 15:09
1
$begingroup$
In the sapiens vector space, one can use the Myers-Brigg personality test.
$endgroup$
– usul
Feb 1 at 15:15
1
$begingroup$
If the main concern is the similarity of the direction of the vectors I would normalise before taking the inner-product, so take $frac{langle v_{1},v_{2}rangle}{|v_{1}||v_{2}|}=cos(theta)$ where $theta$ is the angle between the two vectors.
$endgroup$
– Floris Claassens
Feb 1 at 16:22
1
$begingroup$
Thank you for your suggestions. I forgot to mention that I would like to find a measure tht is able to capture the fact that an angle of 180 degrees would produce the maximum difference. I have found the cosine similarity, but it seems that this measure assumes that maximaly different vectors have 90 degress between them.
$endgroup$
– Zaratruta
Feb 1 at 16:33
$begingroup$
$langle v_1,v_2rangle |v_1times v_2|$ will be proportional to $sin2theta$. Normalize first, as @FlorisClaassens suggests.
$endgroup$
– amd
Feb 1 at 18:23
|
show 1 more comment
2
$begingroup$
Look up the dot product.
$endgroup$
– Wojowu
Feb 1 at 15:09
1
$begingroup$
In the sapiens vector space, one can use the Myers-Brigg personality test.
$endgroup$
– usul
Feb 1 at 15:15
1
$begingroup$
If the main concern is the similarity of the direction of the vectors I would normalise before taking the inner-product, so take $frac{langle v_{1},v_{2}rangle}{|v_{1}||v_{2}|}=cos(theta)$ where $theta$ is the angle between the two vectors.
$endgroup$
– Floris Claassens
Feb 1 at 16:22
1
$begingroup$
Thank you for your suggestions. I forgot to mention that I would like to find a measure tht is able to capture the fact that an angle of 180 degrees would produce the maximum difference. I have found the cosine similarity, but it seems that this measure assumes that maximaly different vectors have 90 degress between them.
$endgroup$
– Zaratruta
Feb 1 at 16:33
$begingroup$
$langle v_1,v_2rangle |v_1times v_2|$ will be proportional to $sin2theta$. Normalize first, as @FlorisClaassens suggests.
$endgroup$
– amd
Feb 1 at 18:23
2
2
$begingroup$
Look up the dot product.
$endgroup$
– Wojowu
Feb 1 at 15:09
$begingroup$
Look up the dot product.
$endgroup$
– Wojowu
Feb 1 at 15:09
1
1
$begingroup$
In the sapiens vector space, one can use the Myers-Brigg personality test.
$endgroup$
– usul
Feb 1 at 15:15
$begingroup$
In the sapiens vector space, one can use the Myers-Brigg personality test.
$endgroup$
– usul
Feb 1 at 15:15
1
1
$begingroup$
If the main concern is the similarity of the direction of the vectors I would normalise before taking the inner-product, so take $frac{langle v_{1},v_{2}rangle}{|v_{1}||v_{2}|}=cos(theta)$ where $theta$ is the angle between the two vectors.
$endgroup$
– Floris Claassens
Feb 1 at 16:22
$begingroup$
If the main concern is the similarity of the direction of the vectors I would normalise before taking the inner-product, so take $frac{langle v_{1},v_{2}rangle}{|v_{1}||v_{2}|}=cos(theta)$ where $theta$ is the angle between the two vectors.
$endgroup$
– Floris Claassens
Feb 1 at 16:22
1
1
$begingroup$
Thank you for your suggestions. I forgot to mention that I would like to find a measure tht is able to capture the fact that an angle of 180 degrees would produce the maximum difference. I have found the cosine similarity, but it seems that this measure assumes that maximaly different vectors have 90 degress between them.
$endgroup$
– Zaratruta
Feb 1 at 16:33
$begingroup$
Thank you for your suggestions. I forgot to mention that I would like to find a measure tht is able to capture the fact that an angle of 180 degrees would produce the maximum difference. I have found the cosine similarity, but it seems that this measure assumes that maximaly different vectors have 90 degress between them.
$endgroup$
– Zaratruta
Feb 1 at 16:33
$begingroup$
$langle v_1,v_2rangle |v_1times v_2|$ will be proportional to $sin2theta$. Normalize first, as @FlorisClaassens suggests.
$endgroup$
– amd
Feb 1 at 18:23
$begingroup$
$langle v_1,v_2rangle |v_1times v_2|$ will be proportional to $sin2theta$. Normalize first, as @FlorisClaassens suggests.
$endgroup$
– amd
Feb 1 at 18:23
|
show 1 more comment
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3096409%2fhow-can-i-measure-the-difference-similarity-between-two-vectors%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3096409%2fhow-can-i-measure-the-difference-similarity-between-two-vectors%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
$begingroup$
Look up the dot product.
$endgroup$
– Wojowu
Feb 1 at 15:09
1
$begingroup$
In the sapiens vector space, one can use the Myers-Brigg personality test.
$endgroup$
– usul
Feb 1 at 15:15
1
$begingroup$
If the main concern is the similarity of the direction of the vectors I would normalise before taking the inner-product, so take $frac{langle v_{1},v_{2}rangle}{|v_{1}||v_{2}|}=cos(theta)$ where $theta$ is the angle between the two vectors.
$endgroup$
– Floris Claassens
Feb 1 at 16:22
1
$begingroup$
Thank you for your suggestions. I forgot to mention that I would like to find a measure tht is able to capture the fact that an angle of 180 degrees would produce the maximum difference. I have found the cosine similarity, but it seems that this measure assumes that maximaly different vectors have 90 degress between them.
$endgroup$
– Zaratruta
Feb 1 at 16:33
$begingroup$
$langle v_1,v_2rangle |v_1times v_2|$ will be proportional to $sin2theta$. Normalize first, as @FlorisClaassens suggests.
$endgroup$
– amd
Feb 1 at 18:23