惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
www.infosecurity-magazine.com
www.infosecurity-magazine.com
L
LINUX DO - 最新话题
N
News | PayPal Newsroom
S
Security Affairs
W
WeLiveSecurity
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Webroot Blog
Webroot Blog
Spread Privacy
Spread Privacy
A
Arctic Wolf
T
Troy Hunt's Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
Cybersecurity and Infrastructure Security Agency CISA
T
Threat Research - Cisco Blogs
V2EX - 技术
V2EX - 技术
Scott Helme
Scott Helme
Google Online Security Blog
Google Online Security Blog
Schneier on Security
Schneier on Security
F
Fortinet All Blogs
U
Unit 42
爱范儿
爱范儿
腾讯CDC
S
Security @ Cisco Blogs
PCI Perspectives
PCI Perspectives
Hacker News - Newest:
Hacker News - Newest: "LLM"
Apple Machine Learning Research
Apple Machine Learning Research
C
CERT Recently Published Vulnerability Notes
Security Latest
Security Latest
Y
Y Combinator Blog
S
Schneier on Security
Cisco Talos Blog
Cisco Talos Blog
T
The Blog of Author Tim Ferriss
Hugging Face - Blog
Hugging Face - Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
IT之家
IT之家
K
Kaspersky official blog
Security Archives - TechRepublic
Security Archives - TechRepublic
博客园 - 聂微东
Cloudbric
Cloudbric
V
V2EX
H
Help Net Security
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
小众软件
小众软件
TaoSecurity Blog
TaoSecurity Blog
T
Tor Project blog
G
Google Developers Blog
人人都是产品经理
人人都是产品经理
GbyAI
GbyAI
MyScale Blog
MyScale Blog

博客园 - 立体风

Sigmoid 函数的数学起源与定义详解 路径在powershell 配置文件 Profile 和 环境变量 PATH 的区别 当AI构建自身 nana gui库的回调函数 Nana c++ gui库的对话框函数 -- 理解 nana 的运行机制 介绍 MSVC 的编译命令/ Zc CMake 变量 ${CMAKE_CURRENT_BINARY_DIR} 学习 nana c++ 库 (一) AutoHotkey v2 的源码学习路线 Visual Studio 中行号右边的黄色竖条 大O表示法推导 allocate 中为什么有两个L vs的cl.exe 编译器 c++20 基本配置 IT高频词 address Python Install Manager (PIM,官方安装管理器)简介 debian 中 contrib 软件仓库 debian 版本号及 apt 命令对软件的区分 sysctl的历史及常用命令 极限运算的法则 TeX 的 ctex 宏包的基本用法 XeLaTeX 的基本用法 XeLaTeX 介绍 为什么梯度向量 ∇f 指向函数值增长最快的方向 三角函数的余弦定理的证明 方向导数公式的证明 仿射函数的定义及用途 凸集的定义及证明 在 LaTeX 公式中处理英文单词 梯度下降法 (Gradient Descent)的数学原理。 梯度下降法简介 向量形式表达最小二乘法 线性回归模型的核心数学表达式 risidual 音标和本义 coefficients的音标及本义(线性模型)
向量点积的几何定义的证明
立体风 · 2025-09-08 · via 博客园 - 立体风

向量点积的几何定义 \(\mathbf{a} \cdot \mathbf{b} = |\mathbf{a}||\mathbf{b}|\cos\theta\) 可以从它的代数定义 \(\mathbf{a} \cdot \mathbf{b} = \sum a_i b_i\) 严格推导出来。最直观的证明方法是使用余弦定理

为了简化证明,我们使用二维向量作为例子,但这个原理可以推广到任意维度的空间。

证明过程

假设有两个二维向量 \(\mathbf{a} = (a_1, a_2)\) 和 $ \mathbf{b} = (b_1, b_2) $。它们在坐标系中的位置,以及它们和原点 \(O\) 构成了一个三角形 \(OAB\),其中 \(A\) 是向量 \(\mathbf{a}\) 的终点, \(B\) 是向量 \(\mathbf{b}\) 的终点。

  • 向量 \(\mathbf{a}\) 的模:$ |\mathbf{a}| = \sqrt{a_1^2 + a_2^2} $
  • 向量 \(\mathbf{b}\) 的模:$ |\mathbf{b}| = \sqrt{b_1^2 + b_2^2} $

连接向量 \(\mathbf{a}\)\(\mathbf{b}\) 终点的向量是 $ \overrightarrow{AB} = \mathbf{b} - \mathbf{a} $。它的分量是 $ (b_1-a_1, b_2-a_2) $。

  • 向量 \(\mathbf{b} - \mathbf{a}\) 的模:$ |\mathbf{b} - \mathbf{a}| = \sqrt{(b_1-a_1)^2 + (b_2-a_2)^2} $

应用余弦定理

在三角形 \(OAB\) 中,我们有三条边:\(OA\) (\(|\mathbf{a}|\)), \(OB\) (\(|\mathbf{b}|\)), 和 \(AB\) (\(|\mathbf{b} - \mathbf{a}|\))。
根据余弦定理,我们知道:

\[|\mathbf{b} - \mathbf{a}|^2 = |\mathbf{a}|^2 + |\mathbf{b}|^2 - 2|\mathbf{a}||\mathbf{b}|\cos\theta \]

其中 \(\theta\) 是向量 \(\mathbf{a}\)\(\mathbf{b}\) 之间的夹角。

现在,我们用向量分量的形式来展开这个等式,并证明它与代数定义等价。

  1. 展开等式左侧:$ |\mathbf{b} - \mathbf{a}|^2 $

    \[|\mathbf{b} - \mathbf{a}|^2 = (b_1-a_1)^2 + (b_2-a_2)^2 \]

    \[= (b_1^2 - 2a_1b_1 + a_1^2) + (b_2^2 - 2a_2b_2 + a_2^2) \]

    \[= (a_1^2 + a_2^2) + (b_1^2 + b_2^2) - 2(a_1b_1 + a_2b_2) \]

  2. 用向量模替换分量
    我们知道 \(|\mathbf{a}|^2 = a_1^2 + a_2^2\) 和 $ |\mathbf{b}|^2 = b_1^2 + b_2^2 $。
    将这些代入上面的展开式:

    \[|\mathbf{b} - \mathbf{a}|^2 = |\mathbf{a}|^2 + |\mathbf{b}|^2 - 2(a_1b_1 + a_2b_2) \]

  3. 比较两个表达式
    现在我们有两个关于 \(|\mathbf{b} - \mathbf{a}|^2\) 的等式:

    • 来自余弦定理:$ |\mathbf{b} - \mathbf{a}|^2 = |\mathbf{a}|^2 + |\mathbf{b}|^2 - 2|\mathbf{a}||\mathbf{b}|\cos\theta $
    • 来自代数展开:$ |\mathbf{b} - \mathbf{a}|^2 = |\mathbf{a}|^2 + |\mathbf{b}|^2 - 2(a_1b_1 + a_2b_2) $

    由于这两个表达式都等于同一个量,它们必须相等:

    \[|\mathbf{a}|^2 + |\mathbf{b}|^2 - 2|\mathbf{a}||\mathbf{b}|\cos\theta = |\mathbf{a}|^2 + |\mathbf{b}|^2 - 2(a_1b_1 + a_2b_2) \]

  4. 化简得到最终结果
    等式两边同时减去 \(|\mathbf{a}|^2 + |\mathbf{b}|^2\) 并除以 $ -2 $:

    \[|\mathbf{a}||\mathbf{b}|\cos\theta = a_1b_1 + a_2b_2 \]

    根据向量点积的代数定义,等式右侧就是 $ \mathbf{a} \cdot \mathbf{b} $。

    因此,我们证明了:

    \[\mathbf{a} \cdot \mathbf{b} = |\mathbf{a}||\mathbf{b}|\cos\theta \]

这个证明表明,几何定义和代数定义是完全等价的。在实际应用中,我们通常使用代数定义来计算点积,然后利用几何定义来解释其物理或几何意义。