Home »
Python »
Linear Algebra using Python
Product of a Matrix and its Transpose Property | Linear Algebra using Python
Linear Algebra using Python | Product of a Matrix and its Transpose Property: Here, we are going to learn about the product of a matrix and its transpose property and its implementation in Python.
Submitted by Anuj Singh, on June 06, 2020
Prerequisites:
In linear algebra, an mxn matrix A is multiplied with its transpose AT then the resultant matrix is symmetric. This is one of the most common ways to generate a symmetric matrix. There is no such restriction for the dimensionality of Matrix A. In this tutorial, we are going to check and verify this property.
A.AT = S
Where, S is a symmetric matrix
Python code to find the product of a matrix and its transpose property
# Linear Algebra Learning Sequence
# Inverse Property A.AT = S [AT = transpose of A]
import numpy as np
M = np.array([[2,3,4], [4,4,8], [4,8,7], [4,8,9] ])
print("---Matrix A---\n", M)
pro = np.dot(M,M.T)
print('\n\nProduct of Matrix A with its Transpose : A * AT = I \n\n', pro)
Output:
---Matrix A---
[[2 3 4]
[4 4 8]
[4 8 7]
[4 8 9]]
Product of Matrix A with its Transpose : A * AT = I
[[ 29 52 60 68]
[ 52 96 104 120]
[ 60 104 129 143]
[ 68 120 143 161]]