반응형
250x250
Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
Tags
- 실시간시스템
- 비트코인
- 오토사
- 블록체인
- 퀀트
- 임베디드
- toefl writing
- 자동매매
- AWS
- 아마존 웹 서비스
- python
- AUTOSAR
- 프로그래밍
- 파이썬
- 토플
- Cloud
- 백트레이더
- backtrader
- can
- 토플 라이팅
- GeorgiaTech
- 자동차sw
- TOEFL
- 개발자
- 암호화폐
- it
- 확률
- 클라우드
- realtimesystem
- probability
Archives
- Today
- Total
Leo's Garage
[Numpy] 행렬 랭크 구하기 본문
728x90
반응형
import numpy as np
# Example matrix
matrix = np.array([[1, 2, 3],
[4, 5, 6],
[7, 8, 9]])
# Calculate the rank of the matrix
rank = np.linalg.matrix_rank(matrix)
print("Rank of the matrix:", rank) # Rank of the matrix is 2
In linear algebra, the rank of a matrix A is the dimension of the vector space generated (or spanned) by the columns. This corresponds to the maximal number of linearly independent columns of A. This, in turn, is identical to the dimension of the space spanned by its rows.
행렬의 열 중에서 선형 독립인 최대 갯수를 Rank라고 하고, 공간의 차원이라고도 한다.
차원은 벡터 공간에서 Basis의 갯수를 결정하게 되므로 이것이 행렬의 행으로 봐도 될 것 이다.
선행 대수에서 중요한 사실은 행과 열의 Rank는 항상 동일하다는 점이다.
728x90
반응형
'Study > 파이썬' 카테고리의 다른 글
| [Numpy] Cost Function 연산 시, linalg.norm을 사용하는 이유 (0) | 2024.09.18 |
|---|---|
| [Numpy] Data Split (1) | 2024.09.15 |
| [python] pathlib 사용 정리 (0) | 2023.09.01 |
