M.2.K

Bemerkung

Grundlagen siehe Norm, Skalarprodukt, Kreuzprodukt.

Gegeben

../../../_images/vector_k1.png

Betrag \(\lVert \boldsymbol v \rVert = v\) eines Vektors \(\boldsymbol v\) berechnet mit dem Satz von Pythagoras.

Gegeben:

  • das \((x,y,z)\)-Bezugssystem

  • die Vektoren \(\boldsymbol v\) und \(\boldsymbol u\) mit den \((x,y,z)\)-Komponenten:

    \begin{align*} \begin{bmatrix}v_x\\v_y\\v_z\end{bmatrix} &= \begin{bmatrix}5\\3\\2\end{bmatrix} \quad&\quad \begin{bmatrix}u_x\\u_y\\u_z\end{bmatrix} &= \begin{bmatrix}1\\-1\\4\end{bmatrix} \end{align*}

a) Betrag

Berechnen Sie:

\begin{align*} \lVert \boldsymbol v \rVert = v &\stackrel{\scriptscriptstyle{0{,}01}}{\approx} \ldots \\ \lVert \boldsymbol u \rVert = u &\stackrel{\scriptscriptstyle{0{,}01}}{\approx} \ldots \end{align*}

Lösung

\begin{align*} \lVert \boldsymbol v \rVert &= v \\ &= \sqrt{v_x^2 + v_y^2 + v_z^2} \\ &= \sqrt{38} \\ &\stackrel{\scriptscriptstyle{0{,}01}}{\approx} 6{,}16 \\ \\ \lVert \boldsymbol u \rVert &= u \\ &= \sqrt{u_x^2 + u_y^2 + u_z^2} \\ &= 3\sqrt{2} \\ &\stackrel{\scriptscriptstyle{0{,}01}}{\approx} 4{,}24 \end{align*}

b) Skalarprodukt

Berechnen Sie:

\begin{align*} \boldsymbol v \cdot \boldsymbol u &= \boldsymbol u \cdot \boldsymbol v \\ &= \ldots \end{align*}

Lösung

Verwendung von Matrix-Multiplikation liefert.

\begin{align*} \boldsymbol v \cdot \boldsymbol u = \boldsymbol u \cdot \boldsymbol v \\ &= \begin{bmatrix}5 & 3 & 2\end{bmatrix} \begin{bmatrix}1\\-1\\4\end{bmatrix} \\ &= \begin{bmatrix}1 & -1 & 4\end{bmatrix} \begin{bmatrix}5\\3\\2\end{bmatrix} \\ &= 10 \end{align*}

c) Kreuzprodukt

Seien die Vektoren \(\boldsymbol s\) und \(\boldsymbol w\) definiert als:

\begin{align*} \boldsymbol s &= \boldsymbol v \times \boldsymbol u \\ \boldsymbol w &= \boldsymbol u \times \boldsymbol v \end{align*}

Berechnen Sie die \((x,y,z)\)-Komponenten von \(\boldsymbol s\) und \(\boldsymbol w\):

\begin{align*} \begin{bmatrix}s_x\\s_y\\s_z\end{bmatrix} &= \begin{bmatrix}\ldots\\\ldots\\\ldots\end{bmatrix} \quad & \quad \begin{bmatrix}w_x\\w_y\\w_z\end{bmatrix} &= \begin{bmatrix}\ldots\\\ldots\\\ldots\end{bmatrix} \end{align*}

Lösung

Lösung mit „Matrix-Kreuzprodukt“:

\begin{align*} \begin{bmatrix}s_x\\s_y\\s_z\end{bmatrix} &= \begin{bmatrix} v_x \\ v_y \\ v_z \end{bmatrix} \times \begin{bmatrix} u_x \\ u_y \\ u_z \end{bmatrix} \\ &= \begin{bmatrix} v_y u_z - v_z u_y\\ v_z u_x - v_x u_z\\ v_x u_y - v_y u_x \end{bmatrix} \\ &= \begin{bmatrix}14\\-18\\-8\end{bmatrix} \\ \\ \begin{bmatrix} w_x \\ w_y \\ w_z \end{bmatrix} &= \begin{bmatrix} u_x \\ u_y \\ u_z \end{bmatrix} \times \begin{bmatrix} v_x \\ v_y \\ v_z \end{bmatrix} \\ &= \begin{bmatrix} u_y v_z - u_z v_y\\ u_z v_x - u_x v_z\\ u_x v_y - u_y v_x \end{bmatrix} \\ &= \begin{bmatrix}-14\\18\\8\end{bmatrix} \end{align*}

SymPy

Source Code eines Programms dazu:

from sympy.physics.units import *
from sympy import *

# Units:
(mm, cm)  =  ( m/1000, m/100 )
kN        =  10**3*newton
Pa        =  newton/m**2
MPa       =  10**6*Pa
GPa       =  10**9*Pa
deg       =  pi/180
half      =  S(1)/2

# Rounding:
def iso_round(x, pv):
    try:
        x = float(x)
        tmp = round(x, pv)
    except TypeError:
        from functools import partial
        func = partial(round, ndigits = pv)
        tmp = x.applyfunc(func)
    return tmp

vx, vy, vz = 5, 3, 2
ux, uy, uz = 1, -1, 4

v = Matrix([vx, vy, vz])
u = Matrix([ux, uy, uz])

pprint("\nv:")
pprint(v)

pprint("\nu:")
pprint(u)

pprint("\nu·v:")
tmp = u.dot(v)
pprint(tmp)

pprint("\n||v||:")
tmp = v.norm()
pprint(tmp)
tmp = iso_round(tmp, 2)
pprint(tmp)

pprint("\n||u||:")
tmp = u.norm()
pprint(tmp)
tmp = iso_round(tmp, 2)
pprint(tmp)

pprint("\n(sx, sy, sz):")
tmp = v.cross(u)
pprint(tmp)

pprint("\n(wx, wy, wz):")
tmp = u.cross(v)
pprint(tmp)

Programm ausführen? Dazu:

  1. Copy: Source Code in die Zwischenablage kopieren.

  2. Paste: Source Code ins Eingabefeld hinter [ ]: einfügen.

  3. Play: Knopf ▶ drücken.