ComponentForm
ComponentForm[ expr ]
ComponentForm[ expr ] converts the vectors in an expression to component form.
| Example | in | rendered | reduced |
|---|---|---|---|
| Rewrite polar coordinate (5, 0.927295218) to component form. | ComponentForm[ PolarVector[ 2, 1/4 pi ] ] |
(√2, √2) |
|
Rewrite the sum of basis vectors (-4i+2j) and (2i-3j) to component form, in basis vector format. |
ComponentForm[ BaseVector[-4,2] + BaseVector[2, - 3], Format => 'BaseVector' ] |
|
-2i-j |
Options
Format
Format determines whether the vector should be rewritten in basis vector form or in Cartesian form. Provide either BaseVector or CartesianVector as an argument.
| Syntax | Example |
|---|---|
ComponentForm[ vector, Format => 'format' ] |
ComponentForm[ PolarVector[ 1, 0 ], Format => 'BaseVector' ] |