```python
# https://colab.research.google.com/github/kassbohm/tm-snippets/blob/master/ipynb/TM_A/TM_0/trafo_tensor/trafo_tensor_2.ipynb

from sympy.physics.units import *
from sympy import *

# Input:

# 1.
# (i1, i2, i3)-components of symmetric tensor:
T11, T12, T13 = -1, 4, 0
T22, T23 = 5, 0
T33 = 0

# 2.
# (i1, i2, i3)-components of unit vector:
d1, d2, d3 = 0, 1, 0

pprint("\nInput 1: (i1, i2, i3)-tensor-components:")
T = Matrix([
    [T11, T12, T13],
    [T12, T22, T23],
    [T13, T23, T33]
    ])
pprint(T)

pprint("\nInput 2: (i1, i2, i3)-unit-vector-components:")
d = Matrix([d1, d2, d3])
tmp = d.norm()
assert(tmp==1)

pprint("\nOutput: Tensor-component in unit-vector-direction:")
tmp = d.transpose()*T*d
pprint(tmp)

# Input 1: (i1, i2, i3)-tensor-components:
# ⎡-1  4  0⎤
# ⎢        ⎥
# ⎢4   5  0⎥
# ⎢        ⎥
# ⎣0   0  0⎦
#
# Input 2: (i1, i2, i3)-unit-vector-components:
#
# Output: Tensor-component in unit-vector-direction:
# [5]

```

b754a9f4da103715e9d7f349b3af49e0f44764cf
ipynb
Jupyter Notebook
ipynb/TM_A/TM_0/trafo_tensor/trafo_tensor_2.ipynb
kassbohm/tm-snippets
5e0621ba2470116e54643b740d1b68b9f28bff12
MIT
ipynb/TM_A/TM_0/trafo_tensor/trafo_tensor_2.ipynb
kassbohm/tm-snippets
5e0621ba2470116e54643b740d1b68b9f28bff12
MIT
ipynb/TM_A/TM_0/trafo_tensor/trafo_tensor_2.ipynb
kassbohm/tm-snippets
5e0621ba2470116e54643b740d1b68b9f28bff12
MIT
Qwen/Qwen-72B
1. YES
2. YES