matrix - 线性变换矩阵
问题描述
找到线性变换 T 的矩阵:R2 → R3,由 T (x, y) = (13x - 9y, -x - 2y, -11x - 6y) 相对于基础 B = {(2, 3) 定义, (-3, -4)} 和 C = {(-1, 2, 2), (-4, 1, 3), (1, -1, -1)} 分别用于 R2 和 R3。
在这里,过程应该是找到 B 的向量的变换并将其表示为 C 的线性组合,这些向量将形成线性变换的矩阵。我的方法是正确的还是我需要改变一些东西?
解决方案
我将向你展示如何在 python 中使用 sympy 模块
import sympy
# Assuming that B(x, y) = (2,3)*x + (-3, -4)*y it can be expressed as a left multiplication by
B = sympy.Matrix(
[[2, -3],
[3, -4]])
# Then you apply T as a left multiplication by
T = sympy.Matrix(
[[13, -9],
[-1, -2],
[-11, -6]])
#And finally to get the representation on the basis C you multiply of the result
# by the inverse of C
C = sympy.Matrix(
[[-1, -4, 1],
[2, 1, -1],
[2, 3, -1]])
combined = C.inv() * T * B
组合变换矩阵产生
[[-57, 77],
[-16, 23],
[-122, 166]])
推荐阅读
- linux - 如何在bash编程中的循环内对文件使用stat
- swift - 我可以将 Swift 包管理器限制在特定平台上吗?
- postgresql - 如何从其他服务器的 dblink 连接?
- json - 使用下拉列表中的数据在 Node-red 上的 SNMP-set 中设置值
- css - 如何在 ant-design 组件中使用 css-in-js?
- vb.net - vb.net My.Settings 类类别和描述
- node.js - Heroku 应用程序错误 Node.js 请如果有人解决他们所说的话?
- ios - 是否有必要从付费开发者帐户创建配置文件以在真实设备中测试应用程序?
- ruby-on-rails - 创建(rails)后如何保持在同一个选项卡(引导程序)上?
- python-3.x - 硒元素要求