User Tools

Site Tools


gibson:teaching:spring-2016:math445:lecture:vectors

**This is an old revision of the document!** ----

A PCRE internal error occured. This might be caused by a faulty plugin

====== Math 445 lecture 2: Vectors ====== Vectors are hugely important in math, science, engineering. In math, a vector is a list of numbers. E.g. this is a 3-d vector <latex> v = \left(\begin{array}{c} 4.3 \\ 5.9 \\ 0.1 \end{array} \right) </latex> In math, the components or elements of a vector are written with subscripts. E.g. for the above vector <latex> v_1 = 4.3, \quad v_2 = 5.9, \quad v_3 = 0.1 </latex> In Matlab, there's a distinction between **row vector** and **column vectors**. You can construct row vectors from explicit lists of elements like this <code> v = [4.3 5.9 0.1] % spaces between elements, or v = [4.3, 5.9, 0.1] % commas between elements </code> You can create column vectors like this <code> v = [4.3; 5.9; 0.1] % semicolons between elements, or v = [4.3 5.9 0.1]' % the transpose of a row vector </code> Note that last method. In Matlab, the apostrophe '' ' '' stands for the **transpose**. The transpose operator turns a row vector into a column vector, and vice versa. <code> >> v = [4.3 5.9 0.1] v = 4.3000 5.9000 0.1000 >> v' ans = 4.3000 5.9000 0.1000 >> u = v' u = 4.3000 5.9000 0.1000 >> w = u' w = 4.3000 5.9000 0.1000 </code>

gibson/teaching/spring-2016/math445/lecture/vectors.1453915959.txt.gz · Last modified: 2016/01/27 09:32 by gibson