135. Python Program to find Normal of the given matrix.
How does this program work?
- In this program we are going to learn about how to find Normal of the given matrix using Python.
- Normal of a matrix is defined as square root of sum of squares of matrix elements.
- And then by using the formula we can find the normal of a matrix.
Here is the code
import numpy as np
a = np.array([[0, 2, 8], [0, 2, 7], [0, 2, 5], [2, 4, 5], [ 8, 4, 7]])
print("Matrix: ",a)
b = np.sqrt(np.sum(np.square(a), axis=0))
print("Square root of the sum of the square of the elements of the matrix is: ",b)