Matrizenrechner
Addieren, multiplizieren, transponieren und berechnen Sie die Determinante von 2×2 und 3×3 Matrizen.
Matrix A
Matrix B
Häufig gestellte Fragen
Code-Implementierung
import numpy as np
A = np.array([[1, 2], [3, 4]])
B = np.array([[5, 6], [7, 8]])
# Addition
print("A + B =\n", A + B)
# Multiplication (dot product)
print("A @ B =\n", A @ B)
# Determinant
print("det(A) =", np.linalg.det(A)) # -2.0
# Inverse (exists only if det ≠ 0)
print("A^-1 =\n", np.linalg.inv(A))
# Transpose
print("A^T =\n", A.T)
# Eigenvalues and eigenvectors
vals, vecs = np.linalg.eig(A)
print("Eigenvalues:", vals)
print("Eigenvectors:\n", vecs)
# Solve linear system Ax = b
b = np.array([1, 2])
x = np.linalg.solve(A, b)
print("Solution x:", x) # A @ x == bComments & Feedback
Comments are powered by Giscus. Sign in with GitHub to leave a comment.