8復丂儀僋僩儖寁嶼

丂丂丂Maple傪妶梡偟偰慄宍戙悢墘嶼傪峴偆偲偒偼丄傑偢

亜 with(linalg):

偲偟偰丄僷僢働乕僕丂linalg丂傪儘乕僪偟偰偍偒傑偡丅僷僢働乕僕丂linalg丂偺徻嵶偵偮偄偰偼丄 僿儖僾傪嶲徠偟偰挷傋傞偙偲偑偱偒傑偡丅椺傪嫇偘側偑傜丄儀僋僩儖偺墘嶼曽朄偵偮偄偰弎傋傑偡丅

亜a:=vector([1,2])
乮儀僋僩儖a=(1,2)丂偺嶌惉)

亜b:=vector([-3,2])
(儀僋僩儖b=(-3,2)丂偺嶌惉)

亜evalm(2丂*丂(a-2丂*丂b)-(3丂*丂a+b))
(2(a-2b)-(3a+b)偺寁嶼)

亜innerprod(a,b)
(撪愊a丒b偺寁嶼)

亜innerprod(vector([x,y,z])丂,丂vector([u,v,w]))
(撪愊 (x,y,z)丒(u,v,w) 偺寁嶼)



幚廗丂8.1丂a=(1,1,0),丂b=丂(-2,1,1),丂c=丂(-1,5,1)丂偲偡傞偲偒丄 師傪寁嶼偟偰傒傑偟傚偆丅
(1)丂5(a+b)-3(2a+c)丂丂丂(2)丂(a+b)丒c丂丂丂(3)丂2(a-2b)丒(2a+c)

[惓夝椺]


僷僢働乕僕LinearAlgebra傪儘乕僪偟偰傕寁嶼偡傞偙偲偑偱偒傑偡丅偙偺偲偒偵偼丄

亜with(LinearAlgebra) :

偲偟偨屻偱丄

亜a:=Vector([1,2])
(儀僋僩儖丂a丂=丂(1,2)偺嶌惉)

亜b:=Vector([-3,2])
(儀僋僩儖 b = (-3,2)偺嶌惉)

亜2 * (a-2 * b)-(3 * a+b)
(2(a-2b)-(3a+b)偺寁嶼)

亜a丂.丂b
(撪愊a丒b偺寁嶼)

亜Vector([x,y,z]) . Vector([u,v,w])
(撪愊丂(x,y,z)丒(u,v,w)丂偺寁嶼)

偲寁嶼偟傑偡丅儀僋僩儖丂a丂=(a1,a2)丂,丂b=丂(b1,b2)偵懳偟

亜a丂.丂b丂丂

傑偨偼
亜DotProduct (a,b)

偲偡傞偲,丂丂偑媮傑傝傑偡丅摿偵

亜DotProduct(a,b,conjugate=false)

偲偡傞偲丄a1b1+a2b2丂偑媮傑傝傑偡丅摨條偵丄3師尦儀僋僩儖偵懳偟偰偼丄

亜Vector([x,y,z])丂.丂Vector([u,v,w])
亜DotProduct丂(Vector丂([x,y,z])丂,丂Vector丂([u,v,w]))丂
亜DotProduct丂(Vector丂([x,y,z])丂,丂Vector丂([u,v,w])丂,丂conjugate=false)丂

偲寁嶼偟傑偡丅

幚廗 8.2丂丂LinearAlgebra傪儘乕僪偟偰丄 幚廗 8.1丂丂傪寁嶼偟偰傒傑偟傚偆丅

[惓夝椺]