电磁学00-矢量分析及作业
电磁场与电磁波课件第一章 矢量分析
第一章 矢量分析
矢量场A的散度可表示为哈密顿微分算子▽与矢量A的标量
积, 即
divA A
A
x
ex
y
ey
z
ez
( Axex
Ayey
Azez )
Ax Ay Az x y z
(A B) A B
(A) A A
第一章 矢量分析
第一章 矢量分析
图 1-3 法线方向的取法
第一章 矢量分析
将曲面S各面元上的A·dS相加,它表示矢量场A穿过整个曲面 S的通量,也称为矢量A在曲面S上的面积分:
SdS SA ndS
如果曲面是一个封闭曲面,则
SA dS
第一章 矢量分析
1.3.2 矢量场的散度
lim SA dS
V 0 V
称此极限为矢量场A在某点的散度,记为divA,即散度的定义式为
grad (uv) vgradu ugradv 或 (uv) vu uv
grad
u v
1 v2
(vgradu
ugradv
或
u v
1 v2
(vu
uv)
grad[ f (u)] f ' (u)gradv 或 [ f (u)] f ' (u)u
第一章 矢量分析
例1-4 设标量函数r是动点M(x, y, z)的矢量r=xex+yey+zez的模,
(x y)2 z 0
或
z (x y)2
第一章 矢量分析
例1-2 求矢量场A=xy2ex+x2yey+zy2ez的矢量线方程。 解: 矢量线应满足的微分方程为
dx xy 2
电磁场矢量分析
A
矢量的几何表示
注意:单位矢量不一定是常矢量。
中央民族大学
2/50
电磁场与电磁波
第1章 矢量分析
3
矢量用坐标分量表示
A ex Ax ey Ay ez Az
Ax A cos
z
Az
A
Ay
Ax O
y
Ay A cos
Az A cos
x
A
A(ex
cos
ey
cos
ez
cos
)
eA
5/50
电磁场与电磁波
第1章 矢量分析
6
(4)矢量的矢积(叉积)
A
B
en
AB
sin
用坐标分量表示为
A
B
ex
( Ay Bz
Az By )
ey
( Az Bx
Ax Bz
)
ez
( Ax By
Ay Bx
)
写成行列式形式为
ex ey ez A B Ax Ay Az
Bx By Bz
A B B A
坐标单位矢量
ex,ey ,ez
位置矢量
r ex x ey y ez z
线元矢量 面元矢量
dr exdx eydy ezdz
dSx
exdlydlz
exdydz
dSy dSz
eydlxdlz
ezdlxdly
eydxdz
ezdxdy
体积元
dV dxdydz
z
z z0 (ez平面)
三条正交曲线组成的确定三维空间任意点位置的体系,称为正 交曲线坐标系;三条正交曲线称为坐标轴;描述坐标轴的量称为 坐标变量。
在电磁场与波理论中,三种常用的正交曲线坐标系为:直角坐 标系、圆柱坐标系和球坐标系。
电磁场与电磁波矢量分析亥姆霍兹定理
电磁场与电磁波
第一章 矢量分析
§1 .2 通量与散度, 散度定理
一、通量
面元:
ˆ ds ds n
ˆ 是面元的法线方向单位矢量 其中: n ˆ 的取向问题: n
对开曲面上的面元, 设这个开曲面是由封闭曲线l所围成的, 则当选定绕行l的方向后, 沿绕行方向按右手螺旋的姆指方 ˆ 的方向 向就是n ˆ 取为封闭面的外法线方向。 对封闭曲面上的面元, n
ˆ (gradient)为 grad n n
grad lˆ l
在直角坐标系中梯度的计算公式
ˆ grad x
ˆ ˆ y z x y z
电磁场与电磁波
第一章 矢量分析
例1 .6
在点电荷q的静电场中, P(x, y, z)点的电位为
注意:x ˆx ˆ
ˆ y ˆz ˆ z ˆ0 y ˆ y ˆz ˆz ˆ, z ˆy ˆ ˆ, y ˆx ˆ x x
直角坐标系中的计算公式:
ˆ x yA ˆ y zA ˆ x yB ˆ y zB ˆ z ) ( xB ˆ z) A B ( xA ˆ ( Ay Bz Az By ) y ˆ ( Az Bx Ax Bz ) z ˆ( Ax By Ay Bx ) x
散度计算公式: divA A
Ax Ay Az ˆ y ˆ z ˆAx y ˆAy z ˆ ˆAz ) A (x x y z x y z x
电磁场与电磁波
第一章 矢量分析
三、散度定理
n2
q ˆds e D ds r r 3 s 4r s q q 2 ds 4 r q 2 s 2 4r 4r
电磁场与电磁波矢量分析
03
电磁场与电磁波的矢量 分析
麦克斯韦方程组
描述电磁场的基本规律,包括电场和 磁场的变化关系。
揭示了电磁场之间的相互依存和制约 关系,是电磁波传播和辐射的基础。
由四个基本方程组成,包括高斯定律、 高斯磁定律、法拉第定律和安培定律。
波动方程与亥姆霍兹方程
01
波动方程描述了电磁波在空间中传播的规律,是麦克斯韦方程 的简化形式。
电磁场与电磁波的特性
01
02
03
波动性
电磁波以波动的形式传播, 具有振幅、频率和相位等 波动特性。
横波
电磁波的电场和磁场振动 方向与波的传播方向垂直, 是一种横波。
传播速度
电磁波在真空中的传播速 度为光速,在其他介质中 的传播速度受介质影响。
电磁场与电磁波的应用
通信
探测
加热
科学研究
无线电波、微波等电磁 波广泛应用于通信领域, 实现信息的传输和接收。
总结词
磁偶极子是由两个电流环组成的系统,其产生的电磁波磁场 分量占主导地位,具有与电偶极子不同的辐射特性。
详细描述
磁偶极子由两个平行的环形电流组成,当其受到激发时,将 产生电磁波向外传播。磁偶极子的辐射场在远场近似下遵循 朗道辐射模式,其磁场分量占主导地位,且具有与电偶极子 不同的方向性和强度分布。
不均匀介质中的传播
折射与反射
当电磁波遇到不同介质的分界面时,会发生折射和反射现象。折 射和反射的角度、强度等特性与介质的性质有关。
散射与吸收
在不均匀介质中,电磁波的传播路径会发生散射,能量会因为介质 的吸收而逐渐减小。
多层介质传播
当电磁波在多层介质中传播时,需要考虑到不同介质分界面上的折 射、反射、散射和吸收等复杂现象。
矢量分析【电磁场与波+电子科技大学】
只要 以 面体,故
即可。
z
点为顶点作一个平行六 x
经过左右两面的通量为:
(x,y,z +△z)
y △z
M●(x,y,z) △y
△x
(x+△x,y,z)
(x,y+△y,z)
用偏微分代替偏增量,得:
第36页
电磁场与电磁波 第一章__矢量分析 同理,前后、上下面的通量分别为:
故从该平行六面体穿出的通量为:
; 没有 分量,则
,所以
第42页
电磁场与电磁波 第一章__矢量分析
微分面积:
e
单位长度( z=1 )圆柱面的通量:
e e
第43页
电磁场与电磁波 第一章__矢量分析
第五节 矢量的环流与旋度
(Circulation and Rotation of Vector Field) 不是所有的矢量场都由通量源激发。存在另一类 不同于通量源的源,它所激发的矢量场的力线是闭合的, 它对于任何闭合曲面的通量为零但在场所定义的空间中 闭合路径的积分不为零。
例如:流速场
、电场
是矢量场
第6页
电磁场பைடு நூலகம்电磁波 第一章__矢量分析
3、场的表示
矢量
,
矢量场
一个矢量场对应着三个标量场
第7页
电磁场与电磁波 第一章__矢量分析 1.1.2 矢量的加法和减法
B
A+B
A
矢量的加法
B
A
-B A-B
矢量的减法
B
第8页
电磁场与电磁波 第一章__矢量分析
1.1.3 矢量的乘法 矢量的点积(标积):
的环流面密度。矢量 称为矢量场 在点M 的旋度,记
第一章 矢量分析(电磁场与电磁波)
例:已知一矢量场F=axxy-ayzx, 试求: (1) 该矢量场的旋度; (2) 该矢量沿半径为3的四分 之一圆盘的线积分, 如图所 示, 验证斯托克斯定理.
y B r=3
O
A x
四分之一圆盘
第 7,8 学时 , 1.4 标量的方向导数和梯度
1.4.1标量的方向导数和梯度 标量的方向导数和梯度 一个标量场u可以用一个标量函数来表示.在直角坐标 系中, 可将u表示为 u=u(x, y, z) 令 u(x, y, z)=C, C为任意常数.该式在几何上一般表示 一个曲面,在这个曲面上的各点,虽然坐标(x, y, z)不同, 但函数值相等,称此曲面为标量场u的等值面 等值面. 随着C 等值面 的取值不同,得到一系列不同的等值面,如下图所示. 同理,对于由二维函数v=v(x, y)所给定的平面标量场, 可按v(x, y)=C得到一系列不同值的等值线.
S → P
∫ lim
l
A dl
S
称固定矢量R为矢量A 的旋度 旋度,记作 旋度 rotA=R 上式为旋度矢量在n方 向的投影,如图所示, 即
rotA 旋旋旋
n
P l
S → P
∫ lim
l
A dl
S
= rotn A
旋度及其投影
矢量场的旋度 旋度仍为矢量 矢量.在直角坐标系中,旋度的表达式为 旋度 矢量
C C=A× B an aA A (a)
图 1 - 3 矢量积的图示及右手螺旋 (a) 矢量积 (b) 右手螺旋
O
aB B
B A
θ
(b)
矢量积又称为叉积 叉积(Cross Product),如果两个不为零的 叉积 矢量的叉积等于零,则这两个矢量必然相互平行,或者 说,两个相互平行矢量的叉积一定等于零.矢量的叉积 不服从交换律,但服从分配律,即 A×B= -B×A × × A×(B+C)=A×B+A×C × × ×
第一章电磁场矢量分析
第一章 矢量分析
【例2】 设 S 为以(0, 0, a) 为心,半径为 R(<|a|)的球面。 求积分
D dS
S
,其中
q D r 3 。 4π r
解:根据散度定理,有 D d S D dV 。 因为在 S 面内部,r≠ 0 ,由例1知,在 S 面内,
q r D 3 0 4 r
第一章 矢量分析
若 > 0 ,表明由闭面 S 中穿出的通量多于由外面 穿入中的通量, 称 S 中存在发出通量的净 ―源‖; 若 < 0,则由外面穿入闭面 S 中通量多于由 S 中穿出 的通量,称 S中存在吸纳通量的净 “洞”。可见,穿过 闭面的通量反映了闭合面所围空间内通量源的总体情况。 但是,有限大闭合面的通量不能反映源在面内各点的 具体分布。
j k e jk r
第一章 矢量分析
1.2 矢量场的散度
1.2.1 通量
设 S 为空间中的某一曲面。在 S 上的一个给定点 r 处 取一矢量面元,规定其法向单位矢量 en 与面元周界线的绕 向成右手螺旋,则矢量场穿过面元的通量定义为
dΦ A d S
A 穿过整个曲面 S 的通量为
S
中取 A = ,则有
V
( ) dV d S
S
利用
( ) 2
第一章 矢量分析
即得格林第一恒等式:
2 ( ) dV d S S
V
在上式中交换 和 ,有
Φ AdS
S
第一章 矢量分析
若 S 为闭曲面,则
Φ AdS
S
对于闭曲面,规定其法矢量向外。 矢量场 的空间分布可用矢量线形象地表示:矢量线上
电磁场与电磁波-第1章矢量分析
的平行六面体的体积 。
B
电磁场与电磁波
第1章 矢量分析
V A ( B C ) C ( A B ) B ( C A ) hBC
注意:先后轮换次序。
A
C
推论:三个非零矢量共面的条件。
A(BC)0
B
在直角坐标系中:
aˆx aˆy aˆz
A(BC)(AxaˆxAyaˆyAzaˆz)Bx By Bz
d dn
aˆ n
aˆ l
P1
dgraddl
dn dl
在直角坐标系中:
P
ddxdydz
0
x y z
P2
0 d
dldxa ˆxdya ˆydza ˆz
所以:gradxaˆxyaˆyzaˆz
梯度也可表示: grad
电磁场与电磁波
第1章 矢量分析
2.减法:换成加法运算
DABA(B )
逆矢量:B 和 ( B ) 的模相等,方向相反,互为逆矢量。
D
A
A
D
B
B
B
C
推论:
B
ABC 0
A
任意多个矢量首尾相连组成闭合多边形,其矢量和必为零。
在直角坐标系中两矢量的减法运算:
A B ( A x B x ) a ˆ x ( A y B y ) a ˆ y ( A z B z ) a ˆ z
则: 2 a b 2 c 3 a 3b c 2 a 2b 3c 5
a 2 b 1 c 3
电磁场与电磁波
第1章 矢量分析
例3: 已知 A2aˆx6aˆy3aˆz B4a ˆx3a ˆya ˆz
电磁场与电磁波—矢量分析
两个矢量的点积:写成
A B
其值为: A B AB cos
A
点积的性质:
θ
交换律 分配律 按乘数比例
A B C A B A C k A B kA B A kB
A B B A
若该物理量为矢量,则称矢量场, 可用矢性函数表示F(x,y,z); F(x,y,z,t) f(x,y,z,t)
若该物理量与时间无关,则该场称为静态场; 若该物理量与时间有关,则该场称为动态场或称为时变场。
第一章
矢量分析
笛卡尔坐标系
我们的标量函数(标量场)通常用笛卡 尔坐标系表示,我们的矢性函数也可以 用笛卡尔坐标系来表示 根据矢量的运算规则,多个矢量可以进 行矢量相加,反过来,一个矢量以可以 分解为多个矢量的和
B
第一章
矢量分析
两个矢量的叉积:写成 r F M 其值为: r F rF sin e n
M
r
F
第一章
矢量分析
叉积的性质:
不服从交换律 但服从分配 按乘数比例
A B C A B A C kA B k A B A kB
0
第一章
矢量分析
△z
z
若函数φ=φ(x, y, z)在点M0(x0, y0, z0)处可 微, cosα 、 cosβ 、 cosγ 为 l 方向的方向余弦, 则函数 φ在点M0处沿l方向的方向导数必定存 在,且为
γ M0 α
△x
ρ
β
M
电磁场与电磁波第1章矢量分析
例:已知一矢量场F=axxy-ayzx, 试求:
(1) 该矢量场的旋度;
(2) 该矢量沿半径为3的四分 之一圆盘的线积分, 如图所 示, 验证斯托克斯定理。
y B
r= 3
O
Ax
四分之一圆盘
第 7、8 学时 1.4 标量的方向导数和梯度
1.4.1标量的方向导数和梯度
一个标量场u可以用一个标量函数来表示。在直角坐标 系中, 可将u表示为
lim l A dl
SP S
称固定矢量R为矢量A的 旋度,记作
rotA=R
上式为旋度矢量在n方 向的投影,如图所示, 即
A dl
lim l
SP S
rotn A
ro tA
n
旋涡面
P l
旋度及其投影
矢量场的旋度仍为矢量。在直角坐标系中,旋度的表达式为
rotA
ax
Az y
Ay z
a
y
Ax z
Az x
z
l
式 中 , 当 Δl→0 时 δ→0 。 将 上 式 两 边 同 除 以 Δl 并 取 极限得到方向导数的计算公式:
u u cos u cos u cos
l x
y
z
ห้องสมุดไป่ตู้
其中,cosα, cosβ, cosγ为l方向的方向余弦。
1.4.4 标量场的梯度
1. 梯度的定义
方向导数为我们解决了函数u(P)在给定点处沿某个方向的 变化率问题。然而从场中的给定点P出发,标量场u在不 同方向上的变化率一般说来是不同的,那么,可以设想,
▽ ·(▽ ×A)≡0
即如果有一个矢量场B的散度等于零,则该矢量B就可 以用另一个矢量A的旋度来表示,即当 ▽ ·B=0 则有
01电磁波第一章-矢量分析
第19页
电磁场与波 第一章__矢量分析
微分面积: dS e ddz dS e ddz dS z e z dd
微分体积: dV dddz
微分体积: dV r 2 sindddr
e
e e
第24页
归纳总结如下:
z
1. 直角坐标系
坐标变量
x, y, z
z z0 (平面 )
ez
e 坐标单位矢量 x , e y , ez
ex
o
P
ey
点 P(x0,y0,z0)
位置矢量
r ex x e y y ez z
① 标量场:空间区域的每点 M ( x , y, z ) 对应一个数量
值 ( x , y, z ) ,它在此空间区域V上构成一
个标量场,用点 M ( x , y, z ) 标量函数(数性
函数) ( x , y, z ) 表示。 标量场的自变量、因变量都是标量 例如:温度场 u( x , y, z ) ,密度场 ( x , y , z ) 是标量场
单位矢量的微分:
随 的变化
de d de
e x sin e y cos e
d
e x cos e y sin e
矢量 A 的表示: A e A e A e z Az
位置矢量: r e e z z
A // B A B 0
物理电子学院
A B A B AB
周俊 第12页
电磁场与波 第一章__矢量分析 矢量的混合运算
最新-《电磁场与电磁波》第1章矢量分析-PPT文档资料
电磁场与电磁波
第1章 矢量分析
在直角坐标系中,两矢量的叉积运算如下: z
A B ( A x a ˆ x A y a ˆ y A z a ˆ z ) ( B x a ˆ x B y a ˆ y B z a ˆ z )
o y
x
(A y B z A z B y )a ˆx (A z B x A x B z)a ˆy (A x B y A y B x )a ˆz
电磁场与电磁波
第1章 矢量分析
矢量: AAxa ˆxAya ˆyAza ˆz
z
模的计算: |A| Ax2Ay2Az2
Az
A
单位矢量:
a ˆ|A A||A A x|a ˆx|A A y|a ˆy|A A z|a ˆz
o
Ax
cosa ˆxcosa ˆycosa ˆz x
Ay
y
方向角与方向余弦: , ,
2.矢量:不仅有大小,而且有方向的物理量。
如:力 F 、速度 v 、电场 E 等
矢量表示为: A | A | aˆ
其中:|
A
|
为矢量的模,表示该矢量的大小。
aˆ 为单位矢量,表示矢量的方向,其大小为1。
所以:一个矢量就表示成矢量的模与单位矢量的乘积。
电磁场与电磁波
第1章 矢量分析
例1:在直角坐标系中, x 方向的大小为 6 的矢量如何表示?
定义: A B C |A ||B ||C |s inc o s hBC A
含义:
C
标量三重积结果为三矢量构成
的平行六面体的体积 。
B
电磁场与电磁波
第1章 矢量分析
V A ( B C ) C ( A B ) B ( C A ) hBC
电磁场(第一章)矢量分析(1)
ˆ ˆ ˆ ˆ ˆ ˆ ˆ ˆ ˆ x × y = z, y × z = x, z × x = y
每一分量都是由两项的差组成; 每一分量都是由两项的差组成; r r A × B = Ax A y Az 每一项的下标不含该分量符号; 每一项的下标不含该分量符号; Bx B y Bz 若每一项由A的分量乘以 的分量, 的分量乘以B的分量 若每一项由 的分量乘以 的分量,则 和的下标顺序是: 和的下标顺序是:x→y→z→x;差的是:z→y→x→z。 ;差的是: 。
返 回 上一页 下一页
2、散度 、
电磁场理论基础
1.2.3 散度定理(高斯公式) 散度定理(高斯公式)
定理的内容: 定理的内容:矢量场散度的体积分等于该矢量穿 过包围该体积的封闭面的总通量, 过包围该体积的封闭面的总通量,即 r r r ∫∫∫V ∇ ⋅ A d v = ∫∫S A ⋅ d s 点电荷q在离其 在离其r处产生的电通量密度为 例1.1 点电荷 在离其 处产生的电通量密度为 r q r r ˆ ˆ ˆ D= r , r = xx + yy + zz , r = x 2 + y 2 + z 2 3 4πr 求任意点处电通量密度的散度,并求穿出以r为半径 求任意点处电通量密度的散度,并求穿出以 为半径 的球面的电通量Ψe。 的球面的电通量 r ˆ ˆ q r ˆ q xx + yy + z z r= 解: D = 3 4π ( x 2 + y 2 + z 2 )3 2 4πr
2
− 2 2 2 5 2 (x + y + z ) 3x2
q r 2 − 3x2 = 4π r5 ∂D y q r2 − 3y2 ∂D z q r 2 − 3z 2 = , = 5 5 ∂y 4π ∂z 4π r r
电磁场课件第一章_矢量分析3
❑如果物理量是标量,称该场为标量场。
例如:温度场、电位场、高度场等。
❑如果物理量是矢量,称该场为矢量场。
例如:流速场、重力场、电场、磁场等。
❑如果场与时间无关,称为静态场,反之为时变场。
时变标量场和矢量场可分别表示为:、),,,(t z y x u )
,,,(t z y x F
确定空间区域上的每一点都有确定物理量与之对应,称在该区域上定义了一个场。
从数学上看,场是定义在空间区域上的函数:
标量场和矢量场
、),,(z y x u )
,,(z y x F
静态标量场和矢量场可分别表示为:
标量场的等值线(面)
•
标量场的梯度是矢量场,它在空间某点的方向表示该点场变化最大(增大)的方向,其数值表示变化最大方向上场的空间变化率。
•
标量场在某个方向上的方向导数,是
梯度在该方向上的投影。
梯度的性质:梯度运算的基本公式:⎪⎪⎪⎩⎪⎪⎪⎨⎧∇'=∇∇+∇=∇∇±∇=±∇∇=∇=∇u
u f u f u v v u uv v u v u u C Cu C )()()()()(0
•标量场的梯度垂直于通过该点的等值面(或切平面)。
第一章矢量分析
2019/10/31
8
第一章 矢量分析
4.电磁场与电磁波的应用
当今世界,电子信息系统,不论是通 信、雷达、广播、电视,还是导航、遥控 遥测,都是通过电磁波传递信息来进行工 作的。因此以宏观电磁理论为基础,电磁 信息的传输和转换为核心的电磁场与电磁 波工程技术将充分发挥其重要作用。下面 我们来看一下一些常见的天线和馈线。
1.2 三种常用坐标系
1、直角坐标系(x,y,z)
方向单位矢量:
eˆx , eˆy , eˆz
位置矢量:
r x0eˆx y0eˆy z0eˆz
矢量表示:
z
z0
O x0 x
A P(x0,y0,z0) ez
y0 y
ex
ey
A Axeˆx Ayeˆy Azeˆz
2019/10/31
eˆ y
sin
eˆ
eˆ sin x
eˆ y
cos
eˆ eˆ
z
z
球面坐标系与直角坐标系间单位矢量变换关系
eˆ eˆ sin cos eˆ sin sin eˆ cos
r
x
y
z
eˆ eˆ sin eˆ cos
x
y
eˆ eˆ cos cos eˆ cos sin eˆ sin
2、三维空间内某一点P处存在的一个既有大小又有 方向特性的量称为矢量。
3、矢量及表示 A eˆA A
单位矢量
2019/10/31
17
第一章 矢量分析
二、矢量的代数运算
矢量的加法和减法 (平行四边形法则)
rr
r
r
r
A B (Ax Bx ) ex (Ay By ) ey (Az Bz ) ez
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
CHAPTER 1 Vector Analysis1.1 Overview1.2 Scalars and Vectors1.3 Vector Addition and Subtraction1.4 Vector Multiplication1.5 Coordinate Systems1.6 Integral Relations for Vectors1.7 Differential Relations for Vectors1.8 Summary1.9 Problems1.1 OverviewVector analysis provides an elegant mathematical language in which electromagnetic theory is conveniently expressed and best understood. In order for students to better understand electromagnetic principles, it is imperative for them to use this mathematical language fluently. Junior or senior level undergraduates may not have adequate knowledge about vector analysis for electromagnetic, although it is likely that vector concepts and operations are introduced in calculus courses.We are going to deal with four major topics in vector analysis: (1) In Sections 1.2 to 1.4, we will discuss vector algebra, including vector addition, subtraction and multiplications; (2) In Sections 1.5, we will discuss vector representation and vector algebra in orthogonal coordinate systems, including Cartesian, cylindrical and spherical systems; and (3) In Sections 1.6 and 1.7, we will discuss vector calculus, which encompasses differentiation and integration of vectors; line, surface and volume integrals; the del (∇) operator; and the gradient, divergence and curl operations.Although we are going to solve our examples in both traditional way (without Matlab) and contemporary way (with MATLAB), we still emphasize that, as a powerful mathematical tool, MATLAB is widely used in engineering curriculum and in industry. Also, vector analysis, which is so crucial in describing electromagnetic phenomena, can be easily implemented using MATLAB.1.2Scalars and VectorsQuantities that can be described by a magnitude alone are called scalars. Energy, temperature, weight, and mass are all examples of scalar quantities. Other quantities, called vectors, require both a magnitude and a direction to fully characterize them. Examples of vector quantities include force, velocity, and acceleration. Thus, a car traveling at 30 miles per hour (mph) can be described by the scalar quantity speed. However, a car traveling 30 mph in a northwest direction can be described by the vector quantity velocity, which has both a magnitude (the 30 mph speed) and a direction (northwest).In electromagnetics, we frequently use the concept of a field . A field is function that assigns a particular physical quantity to every point in a region. In general, a field varies with both position and time. There are scalar fields and vector fields . Temperature distribution on a printed circuit board and carbon dioxide distribution in the atmosphere are examples of scalar fields. Wind velocity distribution in California and gravitational force distribution in Rocky Mountains are examples of vector fields.Please note that in this textbook, boldface type will be used to denote a vector, for example, A . Scalars are printed in italic type, for example, A . Since it is difficult to write bold face letters by hand, it is popular to use an arrow or a bar over a letter (A or A ) or use a bar below a letter (A) to describe a handwritten vector, and a scalar is written without adding any arrows or bars.1.3 Vector Addition and SubtractionA vector has both magnitude and direction. If the magnitude of a vector A is written as |A | or A , the direction of the vector can be specified by the dimensionless unit vector a A defined byAA A A a A ==|| (1.1)Since the unit vector has unity magnitude|a A | = 1 (1.2)and points in the same direction as A , we can specify A in terms of its magnitude A and direction a A asA = |A| a A (1.3)Figure 1-1 shows the vector A represented by a straight line of length A with an arrow pointing in the direction a A . If two vectors have the same magnitude and direction, we define them to be equal vectors , even though they may be displaced in space.Vector addition follows the parallelogram rule as shown in Figure 1-2 (a), where the sum of two vectors A and B gives another vector C which lies along the diagonal of the parallelogram. The parallelogram rule is equivalent to the tip-to-tail rule as shown in Figure 1-2 (b), where the tail of vector B connects to the tip of vector A and the sum vector C connects the tail of A to the head of B .FIGURE 1–1Graphical representation of a vector A with magnitude |A| and unit vector a A.(a) (b)FIGURE 1–2Vector addition using (a) parallelogram rule and (b) tip-to-tail rule.It’s easy to show that vector addition obeys the commutative, associative and distributive laws summarized as follows:Commutative Law: A+B = B+A (1.4)Associative Law: A+(B+C) = (A+B)+C (1.5)Distributive law: k(A+B) = k A + k B (1.6)In (1.6), the multiplication of a vector by a scalar can be defined ask A = kA a A (1.7)If k is a positive scalar, the magnitude of A will be changed by k times without changing the direction.Vector subtraction can be defined through vector addition asA –B = A + (–B ) (1.8)where (–B ) is the negative vector of B which has the same magnitude as B but is pointing in the opposite direction of B .If we are not considering vector fields, we can add or subtract vectors at different positions in space. The ability to employ vector notation allows us the convenience of visualizing problems with or without the specification of a coordinate system. After choosing the coordinate system that most concisely describes the distribution of the field, we then specify the field with the components determined with regard to that coordinate system (i.e., Cartesian, cylindrical, and spherical). Detailed exposition of vector operations will be given in Cartesian (rectangular) coordinates with the equivalent results just stated in the other systems. A vector in Cartesian coordinate system can be specified by stating its three components. For example, vector A can be expressed asA = A x a x + A y a y + A z a z (1.9)where A x , A y , and A z are the magnitudes of the x , y , and z components of the vector A , respectively; and a x , a y and a z are the unit vectors directed along the x , y , and z axes. The addition of two vectors in Cartesian coordinates can be written asA+ B = (A x + B x ) a x +(A y + B y ) a y +(A z + B z )a z (1.10)Two vectors are equal (A =B ) if and only if their corresponding components are equal. That is A x =B x , A y =B y and A z =B z . It is noted that two vectors are equal does not mean they are necessarily identical . Two parallel vectors with the same magnitude and pointing in the same direction are equal, but their tip and tale points may not be the same. If they have the same tip and tale points (meaning that one vector exactly coincides with another vector), they are identical.EXAMPLE 1.1Given the vectors A = 3a x and B = 4a y , compute the sum C = A + B . Find the magnitude of C and the unit vector a C . Plot and label these vectors and the unit vectors a x and a y to illustrate the “tip-to-tail” addition method.Solution:The sum is C = 3a x + 4a y .5==C(340.60.8x y x y =+=+C a a a a a .MATLAB Solution:In MATLAB notation, the two-dimensional vector A can be written in terms of its x and y components asA [3 0]A= 3 0>>=The second vector B is written as[]B 04;>>=where we employ the semicolon in order to display no results.Having “stored” the two vectors A and B into computer memory, we can then perform various mathematical operations. The vectors can be added as C = A + B by typingC=A+BC 34>>=The vector is interpreted as C = 3a x + 4a y .The magnitude of C can be computed using the MATLAB command norm(C). The unit vector a C can be found using the norm function. It is equal to the vector divided by the magnitude of the vector. This is illustrated as follows:magC = norm(C)magC 5 a_C = C/magCa_C =0.6000 0.8000>>=>>MATLAB gives the result to the (user-controllable) default accuracy of four decimal places. At the present time, MATLAB does not have a feature to create a vector directly by drawing with arrows. However, thanks to Jeff Chang and Tom Davis, there exists a user contributed file entitled arrow3 at/matlabcentral/fileexchange/ loadFile.do?objectId=1430A title and captions have been added to the plot using MATLAB plot options. The MATLAB source code is listed in ex101.m.MATLAB figure for EXAMPLE 1.11.4 Vector MultiplicationThe operation of multiplication on vectors can be carried out in two different ways, yielding two very different results. They are scalar (or dot) product and vector (or cross) product.1.4.1 Scalar (or Dot) ProductThe first vector multiplication operation is called either the scalar product, or the dot product. One definition of the scalar product of two vectors iscos cos AB θθ≡=A B A B i (1.11)This multiplication results in a scalar product that is equal to the product of the magnitude of vector A times the magnitude of vector B times the cosine of the smaller angle θof the two angles between the two vectors. An equivalent definition of the dot product is given byx x y y z z A B A B A B ≡++A B i (1.12)The first definition could be considered a geometric definition of the dot product while the second definition could be considered an algebraic definition. With the use of the dot product, we can determine several useful quantities or properties associated with the combination of these two vectors. For instance, we can determine if two vectors are perpendicular or parallel to each other with the use of the dot product. In examining equation 1.11, we note that if A and B are perpendicular to each other, then the angle between them is 90°, and cos (90°) = 0, which means the dot product is equal to zero. In similar fashion, we note that if two vectors are parallel, then the magnitude of the dot product equals the product of the magnitudes of the two vectors. Finally, if we take the dot product of a vector with itself, we obtain the square of the magnitude of the vector, or22A ==A A A i (1.13)Another quantity we can obtain from the dot product is called the scalar projection of one vector onto another. For instance, if we want to obtain the scalar projection of the vector A onto the vector B , we can compute this as follows:proj =B A B A Bi (1.14)Note that this is a scalar quantity, and that we can also define the projection of the vector B onto the vector A in a similar fashion. To see the geometrical illustration of this, see Figure 1-3. We can obtain a more familiar form of the scalar projection by re-writing (1.14) using (1.11) to obtaincos proj θ=B A A (1.15)Finally, we can simplify this even further if the vector B is a unit vector. In that case, the projection is simply the dot product:B cos proj θ==B A A A a i (1.16)FIGURE 1–3Illustration of scalar products of two vectors A and B .One very important physical application of the scalar or dot product is the calculation of work. We can use the dot product to calculate the amount of work done when impressing a force on an object. For example, if we are to move an object a distance Δx in the direction, x , we must apply a force, F , with a component in the same direction. The total amount of work expended, ΔW , is given by the expression()cos x W x x θΔ=Δ=ΔF a F i (1.17)This operation will be very useful later, when we start moving charges around in an electric field and we want to know how much work is required. We will also use the dot product to help us find the amount of flux crossing a surface. Other useful things that can be done using the dot product and its variations include finding the components of a vector if the other vector is a unit vector, or finding the direction cosines of a vector in three-dimensional space.The scalar product obeys the commutative and distributive laws summarized as follows:Commutative Law: =A B B A i i (1.18)Distributive law: ()+=+A B C A B A C i i i (1.19)The MATLAB command that permits taking a scalar product of the two vectors A and B is either dot (A, B) or dot (B, A), since these are equal.1.4.2 Vector (or Cross) ProductThe second vector multiplication of two vectors is called the vector product, or the cross-product, and is defined assin sin AB θθ×××≡=A B A B A B A B a a (1.20)as illustrated in Figure 1-4.FIGURE 1–4Illustration of cross product of two vectors A and BThis multiplication yields a vector whose direction is determined by the “right hand rule.” This rule states that if you take the fingers of your right hand (represented by vector A ) and curl them in the direction of vector B to make a fist, the unit vector a A ×B will point in the direction of your thumb. Therefore, we find that the cross product is “anticommutative”:B × A = −A × B (1.21)or curling from vector B to A points the thumb in the opposite direction.A convenient way to state that the two nonzero vectors are parallel (θ = 0°) or antiparallel (θ = 180°) is to use the vector product. If A ×B = 0, then the two vectors are parallel or antiparallel, since sin0° = sin180° = 0.In Cartesian coordinates, we can easily calculate the vector product by remembering the expansion routine of the following determinant.()()()x y z x y zy z z y z x x z x y y x A A A B B B A B A B A B A B A B A B ×==−+−+−x y zx y za a a A B a a a (1.22)The MATLAB command that computes the vector product of two vectors A and B is cross (A, B). Remember cross (A, B) = - cross (B, A).It is possible to give a geometric interpretation for the magnitude of the vector product. The magnitude |A × B | is the area of the parallelogram whose sides are specified by the vectors A and B as shown in the Figure 1-5. From geometry, we recall that the area of a parallelogram with sides of length A and B with interior angle θ is given by Area = AB sin θ, which is also equal to the area of a rectangle with sides of length A and B sin θ. By the definition of the cross product (1.22), this area is simply its magnitude: Area = |A × B|.FIGURE 1–5Parallelogram spanned by vectors by A and B1.4.3 Triple ProductsTwo triple products encountered in electromagnetic theory are included here. The first is called the scalar triple product . It is defined, following the cyclical permutation, as()()()×=×=×A B C B C A C A B i i i(1.23)It can also be written as a 3 by 3 determinant:()xyz x yz xy z A A A B B B C C C ×=A B C i (1.24)In the following, we show that the volume of a parallelepiped defined by three vectors originating at a point can be defined in terms of the scalar and vector products of the vectors. As illustrated in Figure 1-6, the volume of the parallelepiped is given by()()()()()()area of the base of the parallelepiped height of the parallelepiped |||Volume =××⎛⎛⎞⎞=×=×=×⎜⎜⎟⎟×⎝⎝⎠⎠n A B A B |C a A B C C A B A B i i i (1.25)Note that the height of the parallelepiped is the projection of vector C onto the unit vector (A × B )/|A × B | that is perpendicular to the base.FIGURE 1–6Parallelepiped spanned by three vectors A , B and C .The second triple product is called the vector triple product , such as ()××A B C . It can be shown that()()()××=−A B C B A C C A B i i (1.26)This triple product is sometimes called the “bac-cab” rule, since this is an easy way to remember how the vectors are ordered. The inclusion of the parentheses in this vector triple product is critical since it does not, in general, obey the associative law, that is()()××≠××A B C A B C (1.27)EXAMPLE 1.2Given three vectors A =–a x +2a y +3a z , B =3a x +4a y +5a z and C =2a x –2a y +7a z , compute(a) the scalar product A • B(b) the angle between A and B(c) the scalar projection of A on B(d) the vector product A × B(e) the area of the parallelogram whose sides are specified by A and B(f) the volume of a parallelepiped defined by vectors A, B and C(g) the vector triple product A × (B × C) and check equation (1.26)Solution:(a) The scalar product A • B is given by 13243520=−×+×+×=A B i .(b) The angle between the two vectors is computed from the definition of the scalar product.cos 0.7559 or 40.89θθ====°A B A B i(c)2.8284proj ===B A B A B i (d) The vector product A × B is given by12321410345×=−=−+−x y zx y z a a a A B a a a (e)The area = 17.32×=|A B |=(f) The scalar triple product ()2214(2)107102×=−×+×−−×=−C A B iThe volume of a parallelepiped defined by vectors A, B and C is()|102×=|C A B i(g) The vector product B × C is given by345381114227×==−−−x y zx y z a a a B C a a a Then we have()123510065381114××=−=+−−−x y zx y z a a a A B C a a aThe scalar product 122(2)3715=−×+×−+×=A C i , then()()152015(345)20(227) 510065−=−=++−−+=+−x y z x y z x y z B A C C A B B C a a a a a a a a a i iwhich is the same as()A B C.××MATLAB Solution:The following MATLAB source code can be used to solve the problem and get the same answer as shown in the solution above.A = [-1 2 3];B = [3 4 5];C = [2 -2 7];S = dot(A,B)theta = acos(S/norm(A)/norm(B))*180/pi % in degreesa_B = B/norm(B)projAontoB = dot(A,a_B)T = cross(A,B)areaAB = norm(T)volABC = abs(dot(C,T))Q = cross(B,C);leftside = cross(A,Q)rightside = B*dot(A,C) - C*dot(A,B)These source codes are in ex102.m. In the m-file, we have also added plotting functions. Readers can read the details of the file and run it.MATLAB figure for EXAMPLE 1.21.5Coordinate SystemsIn this text, we will frequently encounter problems where there is a source of an electromagnetic field. To be able to specify the field at a point in space caused by a source, we have to refer to a coordinate system. In three dimensions, the coordinate system can be specified by the intersection of three surfaces. An orthogonal coordinate system is defined when these three surfaces are mutually orthogonal at every point. Coordinate surfaces may be planar or curved. A general orthogonal coordinate system is illustrated in Figure 1–7.FIGURE 1–7A general orthogonal coordinate system. Three surfaces intersect at a point, and the unit vectors are mutually orthogonal at that point.In Cartesian coordinates, all of the three surfaces are planes, and they are specified by each of the independent variables x, y, and z separately having prescribed values. In cylindrical coordinates, the surfaces are two planes and a cylinder. In spherical coordinates, the surfaces are a sphere, a plane, and a cone. We will examine each of these in detail in the following discussion. There are many other coordinate systems that can be employed for particular problems, and there are formulas that allow one to easily transform vectors from one system to another.The three coordinate systems used in this text are pictured in Figure 1–8 as (a), (b), and (c). The directions along the axes of the coordinate systems are given by the sets of unit vectors (a x, a y, a z), (aρ, aφ, a z), and (a r, aθ, aφ) for Cartesian, cylindrical, and spherical coordinates, respectively. In each of the coordinate systems, the unit vectors are mutually orthogonal at every point.FIGURE 1–8The three coordinate systems that will be employed in this text. The unit vectors are indicated. (a) Cartesian coordinates. (b) Cylindrical coordinates. (c) Spherical coordinates.In each coordinate system, the unit vectors point in the direction of increasing coordinate value. In Cartesian coordinates, the direction of the unit vectors is independent of position, whereas in cylindrical and spherical coordinates, unit vector directions at a point in space depend on the location of that point. For example, in spherical coordinates, the unit vector a r is directed radially away from the origin at every point in space; it will be directed in the +z direction if θ = 0, and it will be directed in the −z direction if θ =π. Since we will employ these three coordinate systems extensively in the following chapters, it is useful to summarize the important properties of each one.1.2.1 Cartesian CoordinatesThe unit vectors in Cartesian coordinates depicted in Figure 1–8a are normal to the intersection of three planes as shown in Figure 1–9. Each of the surfaces depicted in this figure is a plane that is individually normal to a coordinate axis.FIGURE 1–9A point in Cartesian coordinates is defined by the intersection of the three planes: x = constant; y = constant; z = constant. The three unit vectors are normal to each of the three surfaces.For the unit vectors that are in the directions of the x , y , and z axes, we can easily prove that•••1•••0x x y y z z x y x z y z ===⎧⎨===⎩a a a a a a a a a a a a (1.28)The following rules also apply to the cross products of the unit vectors, since this is a right-handed system:x y z y z x z xy ×=⎧⎪×=⎨⎪×=⎩a a a a a a a a a(1.29) All other cross products of unit vectors follow from the facts that the cross product is anti-symmetric (a x × a y = −a y × a x , etc.), and the cross product of any vector with itself is zero (a x × a x = 0, etc.).In Figure 1–10, the position vector P r (or P ) from the origin to a point P (x P , y P , z P ) in Cartesian coordinates is defined asr (or )P P x P y P z x y z =++P a a a (1.30)and the distance vector that extends from point P to point Q (x Q , y Q , z Q ) is()()() (or ) PQ Q P Q P x Q P y Q P zx x y y z z =−−=−+−+−R r r Q P a a a (1.31)FIGURE 1–10Illustration of position vectorEXAMPLE 1.3There are four points A(1,2,3), B(4,5,4), C(3,-3,8) and D(2,3,7) in Cartesian coordinate system. Find(1) R AB , R AC and R AD(2) the area of triangle ABC(3) the volume of tetrahedral ABCDSolution:()()()()()()()()()(1)41524333 313283255 2132734AB x y z x y zAC x y z x y z AD x y z x y z =−+−+−=++=−+−−+−=−+=−+−+−=++ R a a a a a a R a a a a a a R a a a a a a(2) The area of the triangle ABC is equal to half of the area of theparallelogram spanned by R AB and R AC . We calculate331201321255AB AC ×==−−−x y zx y z a a a RR a a aThen, the area of triangle ABC15.8902= (3) The volume of the tetrahedral ABCD is equal to 1/6 of the volume of the parallelepiped defined by R AB , R AC and R AD . We calculate()1201(13)4(21)77AD AB AC ×=×+×−+×−=−R R R iTherefore the volume of tetrahedral ABCD =1|()|6AD AB AC ×=R R R i 12.8333MATLAB Solution:The following MATLAB source code can be used to get the same answer as shown in above solution.A = [1 2 3];B = [4 5 4];C = [3 -3 8];D = [2 3 7];R_AB = B - A;R_AC = C - A;R_AD = D - A;T = cross(R_AB,R_AC);Area_ABC = norm(T)/2Volume_ABCD = abs(dot(R_AD,T))/6The above source code is included in ex103.m. The m file also plots triangle ABC and tetrahedral ABCD.MATLAB Figure for EXAMPLE 1.3We can define a time-varying vector field F (x,y,z,t ) whose three components are functions of position (x,y,z ) and time t in Cartesian coordinate system as(,,,)(,,,)(,,,)(,,,)x x y y z z x y z t F x y z t F x y z t F x y z t =++F a a a (1.32)If a vector field G (x,y,z ) is static or time-invariant, we have(,,)(,,)(,,)(,,)x x y y z z x y z G x y z G x y z G x y z =++G a a a (1.33)EXAMPLE 1.4A vector field A in two dimensional space is given as 2(,)42x y x y x xy =+A a a . Find(1) the unit vectors of A at (1, –1) and (–2, 3)(2) plot A x versus x for x from –1 to 1 using MATLAB(3) plot A y versus x and y for 11x −≤≤ and 11y −≤≤using MATLAB function surf(4) plot A using MATLAB function quiver for 11x −≤≤ and 11y −≤≤Solution:(1) We can calculate the values of vector field A at (1, –1) and (–2, 3) as follows22(1,1)4121(1)42(2,3)4(2)2(2)31612x y x y x y x y−=×+××−=−−=×−+×−×=−A a a a a A a a a aThen, the unit vectors at these two points are(1,1)(1,1)0.89440.44720.80.6x y x y −−==−==−A A a a a a a a(2)and (4) are only solved using MATLAB.MATLAB Solution:(1)We can use MATLAB symbolic operations to express a vector field. Thesymbolic operation is easy for students to understand and the student versionof MATLAB has the symbolic toolbox. Firstly, we define x, y and z assymbolic variables using MATLAB command syms assyms x yAnd then we can write down vector field A asA = [4*x^2, 2*x*y]For the values of A at specific points, we can use MATLAB command subs to obtain.A_point1 = subs(A,{x,y},{1,-1})A_point2 = subs(A,{x,y},{-2,3})And the unit vectors can be obtained asa_A1 = A_point1/norm(A_point1)a_A2 = A_point2/norm(A_point2)(2)We can get the x component of A fromAx = A(1);To plot Ax using MATLAB function plot for x from –2 to 2, we need tocalculate numerical values of Ax as followsxx = –1:0.1:1;Axx = subs(Ax,{x},{xx});And then, we can simply plot as followsplot(xx,Axx);(3)We can get Ay fromAy = A(2) ;To plot using surf, we need to build a mesh using MATLAB functionmeshgrid.[X, Y] = meshgrid(-1:0.1:1, -1:0.1;1)And then, we calculate numerical values of Ay on this mesh using subsAy_num = subs (Ay, {x,y},{X,Y})After that, we can plot Ay using 3D MATLAB plot function surfsurf(X,Y,Ay_num)(4)We can also calculate Ax on the mesh although it only depends on x. That is,Ax_num = subs (Ax, {x,y},{X,Y})And then, the vector field A(x,y) can be plotted using quiver.quiver(X,Y,Ax_num,Ay_num)In quiver plot, the magnitude and direction of the vector field at any point areindicated by the length and orientation of the arrows. In all the figures plotted,we can add labels for all the axes and title for each figure. These details were included in the MATLAB source code ex104.m.MATLAB Figure for Example 1.4 (2)MATLAB Figure for Example 1.4 (3)MATLAB Figure for Example 1.4 (4)We will perform line, surface, and volume integrals in the following chapters. Figure 1–11 depicts the differential line element, surface elements, and volume elements in Cartesian coordinates. The differential length vector d l is defined asx y z d dx dy dz =++l a a a (1.34)where dx , dy and dz are differential lengths along ax, ay and az directions respectively.Note that there are six possible differential surface elements, each corresponding to one of the six faces of the differential volume. In each case, the vector direction is the outward normal direction. The differential surface areas normal to ax, ay and az directions arex x y y z zd dydz d dxdz d dxdy =⎧⎪=⎨⎪=⎩s a s a s a (1.35)The differential volume element dv in Cartesian coordinate system is defined as the product of the three differential lengths. That is,dv dxdydz = (1.36)FIGURE 1–11In Cartesian coordinates, a differential line element x y z d dx dy dz =++l a a a is shown. Three of six differential surface elements, d s x = dydz a x , d s y = dxdz a y , and d s z = dxdy a z are shown along with the differential volume element dv = dxdydz .1.2.2 Cylindrical CoordinatesThe unit vectors in cylindrical coordinates depicted in Figure 1–8b are normal to the intersection of three surfaces as shown in Figure 1– 12. Two of the surfaces depicted in this figure are planes, and the third surface is a cylinder that is centered on the z axis. A point (ρ, φ, z ) in cylindrical coordinates is located at the intersection of the two planes and the cylinder. The value of ρ is the distance away from the z axis and the value of φ is the angle between the projection onto the x − y plane and the x axis. The mutually-perpendicular unit vectors a ρ, a φ, and a z are in the direction of increasing coordinate value; note that unlike Cartesian unit vectors, the directions of a ρ and a φ vary with location.。