Matrix Calculator

🌐 English
A (3×3)
Rows: 3
Cols: 3
B (3×3)
Rows: 3
Cols: 3
Supports: fractions (1/2), decimals (0.5), constants (pi, e). Empty cells are treated as 0.

Calculation Results

1. Definition & formulas

The matrix sine of a square matrix $A$ is a matrix function defined by the usual Taylor series:

$$ \sin(A)=\sum_{k=0}^{\infty}\frac{(-1)^k}{(2k+1)!}A^{2k+1}=A-\frac{A^3}{3!}+\frac{A^5}{5!}-\cdots $$

Alternative (complex-exponential) expression:

$$ \sin(A)=\frac{e^{iA}-e^{-iA}}{2i}. $$

If $A$ is diagonalizable $A = VDV^{-1}$, then $\sin(A)=V\sin(D)V^{-1}$ where $\sin(D)$ applies $\sin(\cdot)$ to diagonal entries. The series always converges for every square matrix $A$.

2. Useful computation remarks

  • Diagonal / diagonalizable matrices: compute $\sin$ on eigenvalues and transform back: $\sin(A)=V\sin(D)V^{-1}$.
  • Special nilpotent matrices: if $N^m=0$ then series truncates and computation is finite.
  • Powers that square to $-I$: if $A^2=-\alpha^2 I$ (rotation-like), then $\sin(A)=\frac{\sin(\alpha)}{\alpha}A$ (special case with $\alpha\neq0$).
  • Numerical methods: use Schur decomposition or scaling-and-squaring with Padé approximants for stability in code.

3. Worked examples

Example 1 — diagonal matrix

Compute $\sin(A)$ for

$$ A=\begin{pmatrix}\pi/2 & 0\\[6pt]0 & \pi\end{pmatrix} $$

Diagonal case: apply sine to diagonal entries

$$ \sin(A)=\begin{pmatrix}\sin(\pi/2) & 0\\[6pt]0 & \sin(\pi)\end{pmatrix}=\begin{pmatrix}1 & 0\\[6pt]0 & 0\end{pmatrix}. $$

Input hint for calculator: enter matrix rows as π/2 0 and 0 π.

Example 2 — rotation-generator matrix

Let

$$ A=\begin{pmatrix}0 & -1\\[6pt]1 & 0\end{pmatrix}. $$

Observe $A^2=-I$, so powers cycle: $A^{2k+1}=(-1)^k A$. Thus the series becomes

$$ \sin(A)=A\sum_{k=0}^\infty\frac{(-1)^k}{(2k+1)!}=A\sin(1). $$

So

$$ \sin(A)=\sin(1)\begin{pmatrix}0 & -1\\[6pt]1 & 0\end{pmatrix}. $$

Input hint: enter 0 -1 and 1 0 for matrix A.

4. Common mistakes

  • Applying sine elementwise: $\sin(A)\neq(\sin(a_{ij}))$ in general — use powers or diagonalization.
  • Assuming $\sin(A+B)=\sin(A)+\sin(B)$: matrix sine is not linear in that way (unless $A$ and $B$ commute and extra conditions hold).
  • Truncating series carelessly: for numerical work, naive truncation can cause large errors; prefer stable algorithms.
  • Using diagonalization without checking: not all matrices are diagonalizable; use Schur/Jordan-based methods if needed.
  • Mishandling scaling factors: for $A^2=-\alpha^2 I$ use $\sin(A)=\frac{\sin(\alpha)}{\alpha}A$ (avoid division by zero when $\alpha=0$ — treat separately).

5. Practice problems (answers hidden)

Try these exercises. Click Show Answer to reveal the result.

Exercise 1

$$ A=\begin{pmatrix}0 & 1\\[6pt]-1 & 0\end{pmatrix} $$
Show Answer
$$ \sin(A)=\sin(1)\begin{pmatrix}0 & 1\\[6pt]-1 & 0\end{pmatrix}. $$

Because $A^2=-I$ and $\sin(A)=A\sin(1)$ (see Example 2).

Exercise 2

$$ A=\begin{pmatrix}1 & 0\\[6pt]0 & 2\end{pmatrix} $$
Show Answer
$$ \sin(A)=\begin{pmatrix}\sin(1) & 0\\[6pt]0 & \sin(2)\end{pmatrix}. $$

Diagonal case: apply sine to each eigenvalue.

Exercise 3

$$ A=\begin{pmatrix}0 & 1\\[6pt]0 & 0\end{pmatrix} $$
Show Answer

Here $A^2=0$, so the sine series truncates:

$$ \sin(A)=A=\begin{pmatrix}0 & 1\\[6pt]0 & 0\end{pmatrix}. $$

Nilpotent matrices often yield finite polynomial results.

Exercise 4

$$ A=\begin{pmatrix}\pi/6 & 0 & 0\\[6pt]0 & \pi/3 & 0\\[6pt]0 & 0 & \pi/2\end{pmatrix} $$
Show Answer
$$ \sin(A)=\begin{pmatrix}\sin(\pi/6) & 0 & 0\\[6pt]0 & \sin(\pi/3) & 0\\[6pt]0 & 0 & \sin(\pi/2)\end{pmatrix} = \begin{pmatrix}1/2 & 0 & 0\\[6pt]0 & \sqrt{3}/2 & 0\\[6pt]0 & 0 & 1\end{pmatrix}. $$

Diagonal example with common angle values.


Copyright Notice: This article is original content from the Matrix Calculator website. Please credit the source when sharing or reproducing it. For more matrix computation tools, visit matrixcalcu.com.

Learn matrix multiplication more easily in just 2 minutes with this free game.

Matrix Multiplication Game