Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

small modification in basic geometry dot product#1479

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
adamant-pwn merged 1 commit intocp-algorithms:mainfromsyed0369:patch-1
Aug 9, 2025

Conversation

@syed0369
Copy link
Contributor

@syed0369syed0369 commentedJul 9, 2025
edited
Loading

To see the next important property we should take a look at the set of points$\mathbf r$ for which$\mathbf r\cdot \mathbf a = C$ for some fixed constant$C$.
You can see that this set of points is exactly the set of points for which the projection onto$\mathbf a$ is the point$C \cdot \dfrac{\mathbf a}{|\mathbf a|}$ and they form a hyperplane orthogonal to$\mathbf a$.

I guess for$\mathbf r\cdot \mathbf a = C$ the point of projection is$\mathbf r \cos \theta$ which is of magnitude$C/|\mathbf a|$ and has direction of$\hat{a}$ (unit vec along${\mathbf a}$) so the point is$C \cdot \dfrac{ \hat{\mathbf{a}}}{|\mathbf a|}$ which evaluates to the point$C \cdot \dfrac{\mathbf a}{|\mathbf a|^2}$

@mhayter
Copy link
Contributor

Chatgpt disagrees: Great question — you're close, but the change you've made is not correct from a geometric and mathematical standpoint.

Let’s clarify:

✅ Original (correct) version:
You can see that this set of points is exactly the set of points for which the projection onto
𝑎
a is the point
𝐶

𝑎

𝑎

C⋅
∣a∣
a

,
and they form a hyperplane orthogonal to
𝑎
a.

This is correct, because:

The projection length is constant (equal to
𝐶
C), so the actual point on the line of
𝑎
a is at a distance of
𝐶
C units along the direction of
𝑎
a.

The unit vector in the direction of
𝑎
a is
𝑎

𝑎

∣a∣
a

, so scaling it by
𝐶
C gives you the fixed projection point.

❌ Your modified version:
... the projection onto
𝑎
a is the point
𝐶

𝑎

𝑎

2
C⋅
∣a∣
2

a

This is incorrect, because:

𝑎

𝑎

2
∣a∣
2

a

is not a unit vector — it's a scaled-down version of
𝑎
a.

This form appears in a different context: when you’re projecting a vector onto another vector, the formula for projection is:

proj
𝑎
(
𝑟
)

𝑟

𝑎

𝑎

2

𝑎
proj
a

(r)=
∣a∣
2

r⋅a

⋅a
But here you're describing the set of vectors whose dot product with
𝑎
a is constant, not projecting a specific vector onto another.

✅ TL;DR:
Keep the original form:

𝐶

𝑎

𝑎

C⋅
∣a∣
a

It is geometrically meaningful and correct — describing a point lying at a fixed distance
𝐶
C along the direction of
𝑎
a, which is how the hyperplane is constructed.

Let me know if you'd like a visual explanation of this with an example or diagram.

You said:
Yes

ChatGPT said:
Great! Let’s walk through a visual explanation of the statement:

“The set of points
𝑟
r such that
𝑟

𝑎

𝐶
r⋅a=C form a hyperplane orthogonal to
𝑎
a, and the projection of any such
𝑟
r onto
𝑎
a is the point
𝐶

𝑎

𝑎

C⋅
∣a∣
a

.”

🧠 Step-by-step Visual Intuition:

  1. What does
    𝑟

    𝑎
    =
    𝐶
    r⋅a=C mean?
    The dot product
    𝑟

    𝑎
    r⋅a is:


𝑟



𝑎


cos

𝜃
∣r∣⋅∣a∣⋅cosθ
where
𝜃
θ is the angle between
𝑟
r and
𝑎
a.

So fixing
𝑟

𝑎

𝐶
r⋅a=C means all such vectors
𝑟
r have the same projection onto
𝑎
a.

  1. Geometric meaning of constant projection
    Imagine you have a vector
    𝑎
    a, and you're projecting various points in space (vectors
    𝑟
    r) onto the direction of
    𝑎
    a. If all those projections land at the same spot on the line of
    𝑎
    a, those points form a flat surface (or line, in 2D) that is perpendicular to
    𝑎
    a.

That surface is called a hyperplane orthogonal to
𝑎
a.

  1. Where does the point
    𝐶

    𝑎

    𝑎

    C⋅
    ∣a∣
    a

    come from?
    This is the actual point on the vector
    𝑎
    a's line that is:

Distance
𝐶
C away in the direction of
𝑎
a (since
𝑎
a is a vector),

Scaled by the unit vector in that direction:
𝑎

𝑎

∣a∣
a

So:

Projection point

𝐶

𝑎

𝑎

Projection point=C⋅
∣a∣
a

This point is where all the projections of
𝑟
r's in the set fall. It's the foot of the perpendicular from the hyperplane onto the vector
𝑎
a.

📐 Diagram (conceptual)
pgsql
Copy code
*
/ | <-- vector r
/ |
/ |
/ | <-- All these r's project to the same spot
/ |
------------------------>
^ ^
origin projection point = C * (a / |a|)

           -->         direction of vector a

✅ Summary
The correct projection point is:

𝐶

𝑎

𝑎

C⋅
∣a∣
a

because it describes a fixed location on the line in direction of
𝑎
a.

The set of all vectors
𝑟
r with dot product
𝑟

𝑎

𝐶
r⋅a=C form a hyperplane orthogonal to
𝑎
a, and all of them project onto the same point.

Let me know if you'd like an actual drawn diagram or want to see this in code or coordinate form!

syed0369 reacted with eyes emoji

@mhaytermhayter closed thisAug 8, 2025
@adamant-pwn
Copy link
Member

Substituting$r = C \frac{a}{|a|^2}$ and from$a \cdot a = |a|^2$, we see that, indeed,$r \cdot a = C\frac{|a|^2}{|a|^2}=C$, so it actuallyshould be$|a|^2$.

@mhayter please don't take ChatGPT output for granted, it can often spill wrong information.

Note: ChatGPT 5 givescorrect expression for it.

mhayter and syed0369 reacted with thumbs up emoji

@adamant-pwnadamant-pwn merged commit6bc8214 intocp-algorithms:mainAug 9, 2025
1 check failed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@syed0369@mhayter@adamant-pwn

[8]ページ先頭

©2009-2025 Movatter.jp