Tag Archives: Python numpy-Linear Algebra

A 3D matrix is nothing but a collection (or a stack) of many 2D matrices, just like how a 2D matrix is a collection/stack of… Read More
To find a matrix or vector norm we use function numpy.linalg.norm() of Python library Numpy. This function returns one of the seven matrix norms or… Read More
In this article, we will discuss QR decomposition of a matrix. QR factorization of a matrix is the decomposition of a matrix say ‘A’ into… Read More
In this article, we will discuss how to compute the eigenvalues and right eigenvectors of a given square array using NumPy library.  Example: Suppose we… Read More
Let’s discuss how to find the inner, outer, and cross products of matrices and vectors using NumPy in Python. Inner Product of Vectors and Matrices… Read More
In Python, the determinant of a square array can be easily calculated using the NumPy package. This package is used to perform mathematical calculations on… Read More
In this article, we will discuss QR decomposition or QR factorization of a matrix. QR factorization of a matrix is the decomposition of a matrix… Read More
The fundamental feature of linear algebra are vectors, these are the objects having both direction and magnitude. In Python, NumPy arrays can be used to depict… Read More
Singular Value Decomposition means when arr is a 2D array, it is factorized as u and vh, where u and vh are 2D unitary arrays… Read More
Let’s see how to calculate the difference between the maximum and the minimum values of a given NumPy array along the second axis. Here, the… Read More
In this article, we will use the cond() function of the NumPy package to calculate the condition number of a given matrix. cond() is a… Read More
Finding average of NumPy arrays is quite similar to finding average of given numbers. We just have to get the sum of corresponding array elements… Read More
In simple terms, Euclidean distance is the shortest between the 2 points irrespective of the dimensions. In this article to find the Euclidean distance, we… Read More
Let us see how to calculate the sum of all the columns of a 2 dimensional NumPy array. Example : Input : [[1, 2, 3,… Read More
numpy.inner(arr1, arr2): Computes the inner product of two arrays. Parameters : arr1, arr2 : array to be evaluated. Return: Inner product of the two arrays.… Read More