Component - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Physics : Vectors : Component

Physics[Vectors][Component] - the component (first, second, or third) of a vector

Calling Sequence

Component(A, n)

Parameters

A

-

an algebraic vector

n

-

a name or one of 1, 2, 3, or an algebraic expression representing these numbers

Description

• 

Component(A, n) returns the nth. component of the vector A when A is a projected vector expression, or an unevaluated representation of the nth component when A is a non-projected vector or n is an unresolved name representing one of 1, 2 or 3. If A is not a vector then an error message is returned. Regarding how a vector is identified as such in the context of the Physics/Vectors package, see Identify and type, PhysicsVectors.

  

The %Component is the inert form of Component, that is: it represents the same mathematical operation while holding the operation unperformed. To activate the operation use value.

• 

When Component returns unevaluated, the display on the screen shows the vectorial expression between parentheses, and indexed (as usual when working by hand). This is done using a `print/Component` procedure.

Examples

> 

with⁡PhysicsVectors

&x,`+`,`.`,Assume,ChangeBasis,ChangeCoordinates,CompactDisplay,Component,Curl,DirectionalDiff,Divergence,Gradient,Identify,Laplacian,∇,Norm,ParametrizeCurve,ParametrizeSurface,ParametrizeVolume,Setup,Simplify,`^`,diff,int

(1)
> 

Setup⁡mathematicalnotation=true

mathematicalnotation=true

(2)

An explicit algebraic vector in cartesian coordinates

> 

R≔a⁡x,y,z⁢_i+b⁡x,y,z⁢_j+c⁡x,y,z⁢_k

R≔a⁡x,y,z⁢i∧+b⁡x,y,z⁢j∧+c⁡x,y,z⁢k∧

(3)

The first and third components

> 

Component⁡R,1

a⁡x,y,z

(4)
> 

Component⁡R,3

c⁡x,y,z

(5)

The "nth" component returns unevaluated

> 

Component⁡R,n

a⁡x,y,z⁢i∧+b⁡x,y,z⁢j∧+c⁡x,y,z⁢k∧n

(6)

Substituting n by something concrete, the component is obtained

> 

eval⁡,n=1

a⁡x,y,z

(7)

Here A_ is an abstract non-projected vector; by default, in the framework of the Physics[Vectors] package, symbols ending with "_" represent non-projected vectors (to change this postfix see Setup:

> 

type⁡A_,PhysicsVectors

true

(8)

The second component

> 

Component⁡A_,2

A→2

(9)

When A_ is replaced by a projected vector, the selection of the component is performed

> 

eval⁡,A_=R

b⁡x,y,z

(10)

It is also possible to work all abstract; this is the "nth" component of a non-projected vector

> 

Component⁡A_,n

A→n

(11)

Component admits as argument a generic algebraic vectorial expression, for instance

> 

type⁡A_+B_,PhysicsVectors

true

(12)
> 

Component⁡A_+B_,n

A→+B→n

(13)

Note however that when the expression passed to Component is not a vector, the computation is interrupted with an error message

> 

type⁡A,PhysicsVectors

false

(14)
> 

Component⁡A,n

Error, (in Physics:-Vectors:-Component) first argument is not a vector

See Also

convert,VectorCalculus, Physics, Physics conventions, Physics examples, Physics Updates, Tensors - a complete guide, Mini-Course Computer Algebra for Physicists, Physics/Vectors, Vectors,operations, Vectors/Identify