线性代数中单位向量的定义_定义向量| Python的线性代数

线性代数中单位向量的定义

Linear algebra is the branch of mathematics concerning linear equations by using vector spaces and through matrices. In other words, a vector is a matrix in n-dimensional space with only one column. So vector is one of the important constituents for linear algebra. In this tutorial, we will just understand how to represent a vector in python.

线性代数是使用向量空间和矩阵的线性方程组的数学分支。 换句话说,向量是n维空间中只有一列的矩阵。 因此向量是线性代数的重要组成部分之一。 在本教程中,我们将仅了解如何在python中表示向量。

In the python code, we printed a random vector and it could be done by using the list of python. Secondly, we defined and printed a zero vector in 4-dimensional space. A zero vector is always denoted by z in linear algebra.

在python代码中,我们打印了一个随机向量,可以通过使用python列表来完成。 其次,我们定义并在4维空间中打印零矢量。 在线性代数中,零向量始终由z表示。

定义向量的Python代码 (Python code to define a vector)

# Vector in Linear Algebra

a = [3, 5, -5, 8]
# This is a 4 dimensional vector
# a list in python is a vector in linear algebra

print("Vector a = ", a)
# This is how we can print a vector in python

z = [0, 0, 0, 0]
print("Zero Vector z = ", z)
# This is a zero vector

Output

输出量

Vector a =  [3, 5, -5, 8]
Zero Vector z =  [0, 0, 0, 0]


翻译自: https://www.includehelp.com/python/defining-a-vector.aspx

线性代数中单位向量的定义

你可能感兴趣的:(python,机器学习,线性代数,深度学习,tensorflow)