Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

STensor

Guides

  • Get Started

Tech Notes

  • Basic Tensor Computation
  • ComputationWithMetric

Symbols

  • ChristoffelSymbol
  • CreateTensor
  • EinsteinTensor
  • Inverse
  • IsMetric
  • LineElement
  • RicciScalar
  • RicciTensor
  • RiemannTensor
  • SCoordinateTransform
  • STensor
  • STensorQ
  • Symmetrize
  • TensorRank
  • TensorSymmetry
  • Tr
  • VolumeElement
  • WeylTensor
BowenPing`STensor`
SCoordinateTransform
​
SCoordinateTransform
[T,tragetCods,Transformation,invTransformation]
do coordinate transformation to
tragetCods
on
T
.
​
​
SCoordinateTransform
[T,tragetCods,
cod
1

cod
2
]
do coordinate transformation from cod1 to cod2.
​
Details and Options

Examples  
(3)
Basic Examples  
(2)
Create some tensor in 3D Euclidean space in Cartesian Coordinates first:
In[1]:=
car3={x,y,z};​​sph3={r,θ,ϕ};​​g=
CreateTensor
"g",{0,2},car3,IdentityMatrix[3],
IsMetric
True;​​T=
CreateTensor
["T",{1,0},car3,{1,0,0}];
If we want to transform from Cartesian Coordinates to Spherical Coordinates in 3D Euclidean space, we can use
CoordinateTransformData
to get transformation:
In[2]:=
ts=CoordinateTransformData["Cartesian""Spherical","Mapping"];​​invts=CoordinateTransformData["Spherical""Cartesian","Mapping"];
ts and invts are both pure functions, remember that.
In[3]:=
SCoordinateTransform
[T,sph3,ts,invts]
Out[3]=
STensor
Symbol: T
Rank: {1,0}

We can get the components, and simply them by Spherical Coordinates conditions:
In[4]:=
Simplify
SCoordinateTransform
[T,sph3,ts,invts]["Components"],r>0&&0≤θ<Pi//MatrixForm
Out[4]//MatrixForm=
Cos[ϕ]Sin[θ]
Cos[θ]Cos[ϕ]
r
-
Csc[θ]Sin[ϕ]
r
In[5]:=
Simplify
SCoordinateTransform
[g,sph3,ts,invts]["Components"],r>0&&0≤θ<Pi//MatrixForm
Out[5]//MatrixForm=
1
0
0
0
2
r
0
0
0
2
r
2
Sin[θ]
​
If the transformation has been recorded in
CoordinateTransformData
with names, you can directly use them as input:
In[1]:=
Simplify
SCoordinateTransform
[T,sph3,"Cartesian""Spherical"]["Components"],r>0&&0≤θ<Pi//MatrixForm
Out[1]//MatrixForm=
Cos[ϕ]Sin[θ]
Cos[θ]Cos[ϕ]
r
-
Csc[θ]Sin[ϕ]
r
And Hyperspherical includes 3D spherical, the dimension is determined by the dimension of coordinate system:
In[2]:=
Simplify
SCoordinateTransform
[g,sph3,"Cartesian""Hyperspherical"]["Components"],r>0&&0≤θ<Pi//MatrixForm
Out[2]//MatrixForm=
1
0
0
0
2
r
0
0
0
2
r
2
Sin[θ]
Neat Examples  
(1)

SeeAlso
CoordinateTransform
 
▪
CoordinateTransformData
 
▪
CoordinateChartData
""

© 2025 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com