Forgot password
 Register account
View 2816|Reply 10

行列式det应该怎么适应高度

[Copy link]

414

Threads

1641

Posts

15

Reputation

Show all posts

abababa posted 2020-2-20 10:02 |Read mode
比如写了一些行列式,为了区别绝对值符号,想用det来表示,但是对于高一点的矩阵来说,det不能适应高度,是应该重新定义det为一个命令,还是要用left right来把括号变高?

13

Threads

898

Posts

8

Reputation

Show all posts

色k posted 2020-2-20 12:48
没读懂……
这样吗?
$\det\begin{pmatrix}a&b\\c&d\end{pmatrix}$
\det\begin{pmatrix}a&b\\c&d\end{pmatrix}

414

Threads

1641

Posts

15

Reputation

Show all posts

original poster abababa posted 2020-2-20 12:58
回复 2# 色k

对,就是这种,不过我那个矩阵是这样写的:
  1. \det(\begin{bmatrix}
  2. a&b\\c&d
  3. \end{bmatrix})
Copy the Code

13

Threads

898

Posts

8

Reputation

Show all posts

色k posted 2020-2-20 13:05
回复 3# abababa

去掉小括号就行了吧?

414

Threads

1641

Posts

15

Reputation

Show all posts

original poster abababa posted 2020-2-20 13:12
回复 4# 色k

可还是有些复杂的情况,比如
  1. \det(\begin{bmatrix}
  2. a&b\\c&d
  3. \end{bmatrix}^{-1})
Copy the Code
是先求逆再取行列式,去掉的话,显示成
  1. \det\begin{bmatrix}
  2. a&b\\c&d
  3. \end{bmatrix}^{-1}
Copy the Code
就不太明显了,可能会理解成先取行列式,再负一次方。

13

Threads

898

Posts

8

Reputation

Show all posts

色k posted 2020-2-20 14:06
回复 5# abababa

哦,那这些就加 left right 咯
如果你想全部都加,而且数量很大的话,就在编辑器里批量替换吧,利用正则表达式啥的
前面
  1. \det(\begin{bmatrix}
Copy the Code
替换成
  1. \det\left(\begin{bmatrix}
Copy the Code
后面由于存在复杂情况要麻烦一些
如果是用 winedt,勾上正则表达式,将
  1. \\end\{bmatrix\}\(*\))
Copy the Code
替换成
  1. \\end\{bmatrix\}\0\\right)
Copy the Code
替换时每一个都要看清楚,因为很可能会有一些情况没考虑到的。

414

Threads

1641

Posts

15

Reputation

Show all posts

original poster abababa posted 2020-2-20 18:31
回复 6# 色k

自己定义了一个mydet[1]{\det\left(#1\right)},不过确实太难改了,左边的好找,右边的也不知道哪个括号是

673

Threads

110K

Posts

218

Reputation

Show all posts

kuing posted 2020-2-20 20:54
回复 7# abababa

可以的话传我一份我试试帮你改

414

Threads

1641

Posts

15

Reputation

Show all posts

original poster abababa posted 2020-2-21 08:44
回复 8# kuing

谢谢,已经改完了。一边改一边编译,哪里错了就改哪。

414

Threads

1641

Posts

15

Reputation

Show all posts

original poster abababa posted 2020-9-6 22:56
这个以前一直没什么问题,因为都是用的普通字母。现在用在带尖角帽的字母上,觉得那个括号变得有点竖长。
尖角帽字母用的是这帖里的:
forum.php?mod=viewthread&tid=7352&extra=page=1
行列式用的还是7楼的那个。

这种括号能统一改变吗?先看看普通hat和left right括号在这里是什么效果:
\[\det\left(\hat{A}\hat{B}\right)\]
不带尖角帽的:
\[\det\left(AB\right)\]

673

Threads

110K

Posts

218

Reputation

Show all posts

kuing posted 2020-9-6 23:13
回复 10# abababa

应该没得变,除非换字体(如 yhmath 更换了部分符号,提供更细致的括号和更大的根号等……

Quick Reply

Advanced Mode
B Color Image Link Quote Code Smilies
You have to log in before you can reply Login | Register account

$\LaTeX$ formula tutorial

Mobile version

2025-7-20 06:23 GMT+8

Powered by Discuz!

Processed in 0.014335 seconds, 22 queries