Prof. Vladimir Dobrushkin
Department of Mathematics

 MTH243 (Calculus for Functions of Several Variables) MATHEMATICA. Chapter 13: Vectors Vladimir A. Dobrushkin,Lippitt Hall 202C, 874-5095,dobrush@uri.edu In this course we will use Mathematica computer algebra system (CAS), which is available in computer labs at URI. The Mathematica projects are created to help you learn new concepts. Mathematica is very useful in visualizing graphs and surfaces in three dimensions. Matlab (commercial software) is also available at engineeering labs. Its free version is called Octave. A student can also use free CASs: SymPy (based on Python), Maxima, or Sage.

## Section 13.1. Displacement Vectors

In engineering and mathematics, it is a custom to represent vectors as columns, which are denoted by lower case letters in bold font. Operation of transformation column vecors as rows is called transposition and denoted by letter "T" or prime. In some cases and areas such as probablity, row vectors are used. To distinguish row vectors from column vectors, we write an arrow above the vector, so
${\bf v}^T = \vec{v} = [\,a, b, c \,] .$

Vectors in the Wolfram Language are represented as lists, written and displayed horizontally. For example, the column vector

${\bf v} = \begin{bmatrix} a \\ b \\ c \end{bmatrix}$
where a, b, and c could be any expressions, numerical or algebraic, would be entered and named via the command
v = {a, b, c}
Therefore, Mathematica does pay attention whether a vector is a column vector or a row vector. To specify the column vector, one should define it as a matrix
v = {{a}, {b}, {c}}
Vector addition and scalar multiplication are then very natural. If u and v are two lists of equal length, then
$3{\bf u} + (-2){\bf v}$

will compute the correct vector and return it as a list. If u and v have different sizes, then Mathematica will complain about “objects of unequal length.”

Show[Graphics3D[Arrow[{{0, 0, 0}, {1, 1, 0}}]], Graphics3D[Arrow[{{1, 1, 0}, {0, 1, 0}}]], Graphics3D[Arrow[{{1, 0, 0}, {0, 0, 0}}]], Graphics3D[Arrow[{{0, 0, 0}, {1, 0, 2}}]], Graphics3D[Arrow[{{0, 0, 2}, {1, 0, 2}}]], Graphics3D[Arrow[{{1, 0, 0}, {1, 0, 2}}]], Graphics3D[Arrow[{{0, 1, 2}, {0, 0, 2}}]], Graphics3D[Arrow[{{0, 1, 0}, {0, 1, 2}}]]]
Show[Graphics3D[Style[Arrow[{{0, 0, 1}, {1, 0, 1}} ], Red], Axes -> True, AxesLabel -> {x, y, z}], Graphics3D[Style[Arrow[{{0, 1, 1}, {0, 0, 1}}], Blue]], Graphics3D[Style[Arrow[{{1, 0, 0}, {1, 0, 1}}], Green]], Graphics3D[Style[Arrow[{{1, 0, 0}, {0, 0, 0}}], Orange]], Graphics3D[Style[Arrow[{{0, 0, 0}, {1, 1, 0}}], Purple]], Graphics3D[Style[Arrow[{{0, 1, 0}, {0, 1, 1}}], Black]], Graphics3D[Style[Arrow[{{0, 0, 0}, {1, 0, 1}}], Magenta]], Graphics3D[Style[Arrow[{{1, 1, 0}, {0, 1, 0}}], Cyan]]]
a -> Red
b -> Blue
c -> Green
d -> Orange
e -> Purple
f -> Black
g -> Magenta
j -> Cyan
We plot boxes:
Graphics3D[{Cuboid[{0, 0, 0}, {2, 3, 4}]}]
\[ScriptCapitalR] = Parallelepiped[{0, 0, 0}, {{1, 0, 0}, {1, 1, 0}, {0, 1, 1}}]; {Graphics3D[{Yellow, \[ScriptCapitalR]}], Graphics3D[{EdgeForm[Thick], Red, \[ScriptCapitalR]}], Graphics3D[{Opacity[0.25], Blue, \[ScriptCapitalR]}], Graphics3D[{EdgeForm[Directive[Thick, Dotted]], FaceForm[None], \[ScriptCapitalR]}]}
Graphics3D[{Opacity[0.25], {Cuboid[{0, 0, 0}, {2, 3, 1}]}}]

## Section 13.2. Vectors in General

Two individuals played a key role in the creation of modern vector analysis. They were an American scientist Josiah Willard Gibbs from Yale, Connecticut, and an English self-taught electrical engineer, mathematician, and physicist Oliver Heaviside (1850--1925), who independently developed the system that is almost universally taught at the present time.