mathematik2/vektoren/serie_1_26.py

18 lines
490 B
Python

# %%
# Determinante mit Python berechnen
import numpy as np
a = [1, 1, 1, 0] # a Vektor
b = [1, 0, -1, 1] # b Vektor
c = [2, 1, 1, 0] # c Vektor
d = [0, 0, -1, 1] # d Vektor
e = [-3, -2, -3, -1] # e Vektor
abcd = [a, b, c, d]
abde = [a, b, d, e]
abce = [a, b, c, e]
print(f"Determinante abcd: {np.linalg.det(abcd)}") # Determinante abcd
print(f"Determinante abde: {np.linalg.det(abde)}") # Determinante abde
print(f"Determinante abce: {np.linalg.det(abce)}") # Determinante abce