Search Contact information
University of Cambridge Home Department of Engineering
University of Cambridge >  Engineering Department >  computing help
next up previous contents
Next: Matrix functions Up: Matrix operations Previous: Picking sub-matrices

Matrix operators

Matrix operators work much as expected. In order of precedence they are listed in table 1.
Table 1: Matrix operators
' transpose
^ power
* multiplication
/ right division
\ left division
+ addition
- subtraction

Note that the normal matrix rules apply, so matrices need to be appropriately shaped. Using .* (note the extra dot) multiples corresponding elements together. ./ and .\ work in a similar way. .^ raises each element to the given power (rather than the matrix as a whole).

© Cambridge University Engineering Dept
Information provided by Tim Love