当前位置:网站首页>标量、向量、数组和矩阵
标量、向量、数组和矩阵
2022-06-12 20:00:00 【凯之~】
标量(数量)
物理定义:只有大小,没有方向的量。(在坐标变换下保持不变)
对应物理示例:质量、密度、温度、功、能量等只有数值大小,没有方向的物理量
从维度上看,标量可以认为是一维的,类似质点,只能用于描述某种东西的量的大小
向量(矢量)
物理定义:具有大小和方向的量。(在坐标变换下保持不变)
对应物理示例:位移、力等既有大小,又有方向的物理量
向量一般有两种方式表示
1.坐标表示:定义一个对应维度的坐标系,将向量起始坐标移到原点,此时向量终点坐标可表示该向量。(通过坐标轴对应的单位向量形成)
2.有向线段表示:通过模和对应的单位向量表示。模即该向量的长度,对应的单位向量即方向与该向量的方向一致,且长度为1的向量。(当然单位向量一般也是通过坐标表示)
综上所述,向量一般通过多个数值表示(或者说,描述),但这不代表向量由标量组成。
从维度上看,向量是二维及以上的存在,二维向量也被称为平面向量
矩阵
数学概念:按照长方形阵列排列的数值集合,矩阵一般指二维矩阵。
矩阵的每个元素都是一个标量,每一行/列(>1)都可以表示一个向量,即n个元素排成一行形成的矩阵就是一个n维的行向量,排成一列形成的矩阵就是一个n维的列向量,
矩阵的计算方法与标量、向量不同,其特殊的表示方式对计算某些有联系的数据比较方便。矩阵在统计分析、电路学、光学和量子物理等学科上都有应用。
从维度上看,n维向量不管维度n多大,都只是线,但矩阵则至少是面(二维),立方体(三维),……
数组
与上述的标量、向量、矩阵不同的是,数组是编程语言中的概念,类似数学概念的集合,由元素组成。数组也被称为有序的元素序列,通过下标可访问相应的元素,其中的元素一般类型相同。
数组几乎等效于矩阵,并且向下兼容向量和标量,数组元素本身就是标量;将数组元素按一维方式组合形成的一维数组就是向量(类似矩阵)(注意:一维数组可以表示n维向量);将数组元素按行列方式组合形成的二维数组就是二维矩阵(注意,矩阵具有特殊的运算,比如行列式值,秩等,但二维数组一般只是用于存储数据,除了MATLAB)
数组和矩阵可以认为形式一致,前者是编程语言中数据的集合,后者是数学语言(线性代数)中数据的集合。编程语言中的数组有不同维度,但一般只用来存储相应的数据而不会用整个数组进行计算(除了MATLAB!!!)。数学语言中的矩阵同样有多个维度,存储的数据一般会有某些紧密的联系,比如多项式方程组的系数等,并且矩阵与矩阵之间会有各种运算。
个人认为,矩阵是数学描述方形阵列排列的数值集合,而数组是编程语言中数据存储的一种方式,完全可以把数组当作模仿矩阵的一种数据存储方式,当然,大部分编程语言不模仿相应的计算。
边栏推荐
- Compilation of programs
- Blue Bridge Cup basic-14 VIP question time conversion
- Installation and testing of open source deep learning framework plaidml
- Negative remainder problem
- 94. analyze the content in the web page
- Golang type assertion understanding [go language Bible]
- Negative remainder problem
- How do indexes match?
- Continuously improve the overall performance of adaoracle Oracle Oracle
- Understand Jack Dorsey's web5 from the ppt on page 16
猜你喜欢

API call display, detailed API of Taobao, tmall and pinduoduo commodity pages, and return of APP side original data parameters

If you master these skills, you can also write a high score resume in the eyes of HR

The latest Ningxia construction safety officer simulation question bank and answers in 2022

torch 网络模型转换onnx格式,并可视化

QT -- how to get the contents of selected cells in qtableview

First build green, then build city

Hardware test - why not use grounding clip for ripple test

Reading small program based on wechat e-book graduation design (4) opening report

基于微信电子书阅读小程序毕业设计毕设作品(4)开题报告

Installation and testing of open source deep learning framework plaidml
随机推荐
Wechat e-book reading applet graduation design completion works (3) background function
The joint empowerment plan of Baidu PaddlePaddle large enterprise open innovation center was launched! Help Pudong to upgrade its industry intelligently
Ctfshow-web266 (deserialization)
【splishsplash】自定义导出器
JDBC接口总结
Negative remainder problem
API call display, detailed API of Taobao, tmall and pinduoduo commodity pages, and return of APP side original data parameters
6 R factor and judgment Na
【GAMES101】课堂笔记8–着色(着色频率、图形管线、纹理映射)
What is a hash index?
synchronized下的 i+=2 和 i++ i++执行结果居然不一样
Index optimization principle
用户权限和组权限
Demand and business model analysis-3-design
基于微信电子书阅读小程序毕业设计毕设作品(1)开发概要
EFCore调优
Continuously improve the overall performance of adaoracle Oracle Oracle
Using / developing private plug-ins in traifik proxy 2.5 (traifik official blog)
登錄mysql
[games101] class note 8 - shading (shading frequency, graphics pipeline, texture mapping)