Questions tagged [matrices]

For any topic related to matrices. This includes: systems of linear equations, eigenvalues and eigenvectors (diagonalization, triangularization), determinant, trace, characteristic polynomial, adjugate and adjoint, transpose, Jordan normal form, matrix algorithms (e.g. LU, Gauss elimination, SVD, QR), invariant factors, quadratic forms, etc. For questions specifically concerning matrix equations, use the (matrix-equations) tag.

21
votes
5answers
2k views

How to answer mathematical questions in the proper way

In my linear algebra class, I get the answer and everything right but lose points on the mathematical writing, symbols, notations etc ... Is there a comprehensive book or document that provides ...
21
votes
4answers
28k views

Proving: “The trace of an idempotent matrix equals the rank of the matrix”

How could we prove that the "The trace of an idempotent matrix equals the rank of the matrix"? This is another property that is used in my module without any proof, could anybody tell me how to prove ...
21
votes
5answers
15k views

Symmetric matrix is always diagonalizable?

I'm reading my linear algebra textbook and there are two sentences that make me confused. (1) Symmetric matrix $A$ can be factored into $A=Q\lambda Q^{T}$ where $Q$ is orthogonal matrix : ...
21
votes
3answers
872 views

Complexity of computing $ABx$ depends on the order of multiplication

To calculate $y = ABx$ where $A$ and $B$ are two $N\times N$ matrices and $x$ is an vector in $N$-dimensional space. there are two methods. One is to first calculate $z=Bx$, and then $y = Az$. This ...
21
votes
3answers
16k views

Sum of positive definite matrices still positive definite?

I have two matrices, which are square, symmetric, and positive definite. I would like to prove that the sum of the two matrices still have the same properties, that is square, symmetric, and positive ...
21
votes
6answers
2k views

A matrix is diagonalizable, so what?

I mean, you can say it's similar to a diagonal matrix, it has n independent eigenvectors, etc., but what's the big deal of having diagonalizability? Can I solidly perceive the differences between two ...
21
votes
2answers
12k views

Are one-by-one matrices equivalent to scalars?

I am a programmer, so to me $[x] \neq x$—a scalar in some sort of container is not equal to the scalar. However, I just read in a math book that for $1 \times 1$ matrices, the brackets are often ...
21
votes
3answers
9k views

Integer matrices with integer inverses

If all entries of an invertible matrix $A$ are rational, then all the entries of $A^{-1}$ are also rational. Now suppose that all entries of an invertible matrix $A$ are integers. Then it's not ...
21
votes
2answers
2k views

Characteristic polynomials exhaust all monic polynomials?

Let $A$ be an $n\times n$ matrix, then $\mathrm{char}_A(x):=\det(xI-A)$ is a monic polynomial of degree $n$. It is called the characteristic polynomial of $A$. My question is the converse: Let $p(x)...
21
votes
2answers
3k views

$AB=BA$ implies $AB^T=B^TA$.

I am looking for an elementary proof (if such exists) of the following: $$ AB=BA \quad\Longrightarrow\quad AB^T=B^TA, $$ where $A$ and $B$ are $n\times n$ real matrices, and $A$ is a normal matrix, i....
21
votes
3answers
885 views

Old AMM problem

I am working on an old AMM problem: Suppose $A,B$ are $n\times n$ real symmetric matrices with $\operatorname{tr} ((A+B)^k)= \operatorname{tr}(A^k) + \operatorname{tr}(B^k) $ for every positive ...
21
votes
4answers
1k views

Determinant of a generalized Pascal matrix

Let $M$ denote the infinite matrix defined recursively by $$ M_{ij} = \begin{cases} 1, & \text{if } i=1 \text{ and } j=1; \\ aM_{i-1,j}+bM_{i,j-1}+cM_{i-1,j-1}, & \mbox{otherwise}.\...
21
votes
0answers
1k views

How do I find the common invariant subspaces of a span of matrices?

Let $G_1, \ldots, G_n$ be a set of $m\times m$ linearly-independent complex matrices. Let $\mathcal{G} = \operatorname{span}\left\{ G_1, \ldots , G_n\right\}$ be the vector space that spans the set ...
21
votes
0answers
788 views

Determining the kernel of a Vandermonde-like matrix

The kernel of a Vandermonde matrix can be determined using this formula. The following type of matrix has a similar structure, and should also have a one-dimensional kernel. $$V= \begin{bmatrix} ...
20
votes
3answers
6k views

Why do the $n \times n$ non-singular matrices form an “open” set?

Why is the set of $n\times n$ real, non-singular matrices an  open subset of the set of all $n\times n$ real matrices? I don't quite understand what "open" means in this context. Thank you.
20
votes
5answers
26k views

Why is Frobenius norm of a matrix greater than or equal to the 2 norm?

How can you prove that: $$\|A\|_2 \le \|A\|_F$$ I cannot use: $$\|A\|_2^2 = \lambda_{max}(A^TA)$$ It makes sense that the 2-norm would be less than or equal to the Frobenius norm but I don't know how ...
20
votes
2answers
40k views

Expressing the determinant of a sum of two matrices?

Can $$\det(A + B)$$ be expressed in terms of $$\det(A), \det(B), n$$ where $A,B$ are $n\times n$ matrices? # I made the edit to allow $n$ to be factored in.
20
votes
3answers
2k views

Can I compare real and complex eigenvalues?

I'm calculating the eigenvalues of the matrix $\begin{pmatrix} 2 &0 &0& 1\\ 0 &1& 0& 1\\ 0 &0& 3& 1\\ -1 &0 &0 &1\end{pmatrix}$, which ...
20
votes
5answers
7k views

The characteristic and minimal polynomial of a companion matrix

The companion matrix of a monic polynomial $f \in F\left[x\right]$ in 1 variable $x$ over a field $F$ plays an important role in understanding the structure of finite dimensional $F[x]$-modules. It ...
20
votes
3answers
38k views

How to prove $\operatorname{Tr}(AB) = \operatorname{Tr}(BA)$?

there is a similar thread here Coordinate-free proof of $\operatorname{Tr}(AB)=\operatorname{Tr}(BA)$?, but I'm only looking for a simple linear algebra proof.
20
votes
4answers
15k views

why geometric multiplicity is bounded by algebraic multiplicity?

The algebraic multiplicity of $\lambda_{i}$ is the degree of the root $\lambda_i$ in the polynomial $det(A-\lambda)$. The geometric multiplicity is the dimension of the eigenspace of eigenvalue $\...
20
votes
3answers
31k views

extracting rotation, scale values from 2d transformation matrix

How can I extract rotation and scale values from a 2D transformation matrix? ...
20
votes
3answers
16k views

Parenthesis vs brackets for matrices

When I first learned linear algebra, both the professor and the book used brackets like [ and ] to enclose matrices. However, in ...
20
votes
3answers
21k views

Rotation Matrix of rotation around a point other than the origin

In homogeneous coordinates, a rotation matrix around the origin can be described as $R = \begin{bmatrix}\cos(\theta) & -\sin(\theta) & 0\\\sin(\theta) & \cos(\theta) & 0 \\ 0&0&...
20
votes
7answers
35k views

How to calculate gradient of $x^TAx$

I am watching the following video lecture: https://www.youtube.com/watch?v=G_p4QJrjdOw In there, he talks about calculating gradient of $ x^{T}Ax $ and he does that using the concept of exterior ...
20
votes
3answers
28k views

Matrices: left inverse is also right inverse? [duplicate]

If $A$ and $B$ are square matrices, and $AB=I$, then I think it is also true that $BA=I$. In fact, this Wikipedia page says that this "follows from the theory of matrices". I assume there's a nice ...
20
votes
2answers
27k views

Difference between orthogonal and orthonormal matrices

Let $Q$ be an $N \times N$ unitary matrix (its columns are orthonormal). Since $Q$ is unitary, it would preserve the norm of any vector $X$, i.e., $\|QX\|^2 = \|X\|^2$. My confusion comes when the ...
20
votes
3answers
9k views

Square root of a matrix

Under what conditions does a matrix $A$ have a square root? I saw somewhere that this is true for Hermitian positive definite matrices(whose definition I just looked up). Moreover, is it possible ...
20
votes
2answers
516 views

How find this determinant $\det(\cos^4{(i-j)})_{n\times n}$

Question: Define the matrix $A_{k}=(a^k_{ij})_{n\times n}\quad$where $a_{ij}=\cos{(i-j)},\quad n\ge 6$ Find the value $$\det(A_{4})=\:?$$ My try: since $$\det(A_{4})=\begin{vmatrix} 1&\cos^...
20
votes
1answer
1k views

What is the intuition behind / How can we interpret the eigenvalues and eigenvectors of Euclidean Distance Matrices?

Given a set of points $x_1,x_2,\dots,x_m$ in the euclidean space $\mathbb{R}^n$, we can form a $m\times m$ Euclidean Distance Matrix $D$ where $D_{ij}={\|x_i-x_j\|}^2$. We know a little bit about ...
20
votes
1answer
458 views

When do two matrices have the same exponential?

Let $A$ and $B$ be $n\times n$ hermitean matrices. When do we have $e^{iA}=e^{iB}$? Can we somehow classify those pairs of matrices that have the same exponential? Here are some observations that I ...
19
votes
5answers
3k views

If $A$ and $B$ are matrices such that $AB^2=BA$ and $A^4=I$ then find $B^{16}$.

If $A$ and $B$ are matrices such that $AB^2=BA$ and $A^4=I$, then find $B^{16}$. My Method: Given $$AB^2=BA \tag{1}$$ Post multiplying with $B^2$ we get $$AB^4=BAB^2=B^2A$$ Hence $$AB^4=B^2A$$ Pre ...
19
votes
6answers
2k views

Is there a matrix $A$ such that for every other matrix $B$, we have $\mbox{tr}(AB) = 0$?

I'm struggling to prove/disprove this notion. I've figured if such matrix exists, it has to be nilpotent and non-invertible, and the sum of its eigenvalues is 0. Can anyone chip in? Edit : Oh yeah, $...
19
votes
11answers
1k views

Why represent a complex number $a+ib$ as $[\begin{smallmatrix}a & -b\\ b & \hphantom{-}a\end{smallmatrix}]$? [duplicate]

I am reading through John Stillwell's Naive Lie Algebra and it is claimed that all complex numbers can be represented by a $2\times 2$ matrix $\begin{bmatrix}a & -b\\ b & \hphantom{-}a\end{...
19
votes
2answers
4k views

Is it always true that $\det(A^2+B^2)\geq0$?

Let $A$ and $B$ be real square matrices of the same size. Is it true that $$\det(A^2+B^2)\geq0\,?$$ If $AB=BA$ then the answer is positive: $$\det(A^2+B^2)=\det(A+iB)\det(A-iB)=\det(A+iB)\overline{\...
19
votes
4answers
17k views

How to prove $\det(e^A) = e^{\operatorname{tr}(A)}$?

Prove $$\det(e^A) = e^{\operatorname{tr}(A)}$$ for all matrices $A \in \mathbb{C}_{n×n}$.
19
votes
7answers
23k views

practical uses of matrix multiplication

The use of matrix multiplication is usually given with graphics initially (scalings, translations, rotations, etc). Then there are more in-depth examples such as counting the number of walks between ...
19
votes
3answers
30k views

How to calculate the gradient of log det matrix inverse?

How to calculate the gradient with respect to $X$ of: $$ \log \mathrm{det}\, X^{-1} $$ here $X$ is a positive definite matrix, and det is the determinant of a matrix. How to calculate this? Or what'...
19
votes
4answers
13k views

Proof of elementary row operations for matrices?

I'm taking a Linear Algebra course, and we just started talking about matrices. So we were introduced to the elementary row operations for matrices which say that we can do the following: Interchange ...
19
votes
8answers
36k views

How to check if a symmetric $4\times4$ matrix is positive semi-definite?

How does one check whether symmetric $4\times4$ matrix is positive semi-definite? What if this matrix has also rank deficiency: is it rank 3?
19
votes
3answers
27k views

How do you prove that $tr(B^{T} A )$ is a inner product?

Consider the vectorspace of all real $m \times n$ vectors and define an inner product $\langle A,B\rangle = \operatorname{tr}(B^T A)$. "tr" stands for "trace" which is the sum of the ...
19
votes
4answers
3k views

A problem on condition $\det(A+B)=\det(A)+\det(B)$

Let $A$ be a matrix $n\times n$ matrix such that for any matrix $B$ we have $\det(A+B)=\det(A)+\det(B)$. Does this imply that $A=0$? or $\det(A)=0$?
19
votes
4answers
31k views

Can you use row and column operations interchangeably?

Is it possible to use row and column operations "at the same time" on a matrix $A$? So, for example, first subtracting $row_1$ from $row_2$, and then choosing to multiply $column_3$ by a constant $c$? ...
19
votes
3answers
1k views

For every matrix $A\in M_{2}( \mathbb{C}) $ there's $X\in M_{2}( \mathbb{C})$ such that $X^2=A$?

True\False? For every matrix $A\in M_{2}( \mathbb{C}) $ there's $X\in M_{2}( \mathbb{C})$ such that $X^2=A$. I know that every complexed matrix has a Jordan form matrix $J$ such that $P^{-1}CP=J$, ...
19
votes
1answer
2k views

How to understand the spectral decomposition geometrically?

Let $A$ be a $k\times k$ positive definite symmetric matrix. By spectral decomposition, we have $$A = \lambda_1e_1e_1'+ ... + \lambda_ke_ke_k'$$ and $$A^{-1} = \sum_{i=1}^k\frac{1}{\lambda_i}...
19
votes
2answers
2k views

Variety of Nilpotent Matrices

Let $k$ be an algebraically closed field and view $M_n(k)$ as $\mathbb{A}^{n^2}$. $A\in M_n(k)$ is nilpotent if and only if $A^n=0$. Since the equation $A^n=0$ is given by $n^2$ polynomial equations,...
19
votes
3answers
4k views

Block Diagonal Matrix Diagonalizable

I am trying to prove that: The matrix $C = \left(\begin{smallmatrix}A& 0\\0 & B\end{smallmatrix}\right)$ is diagonalizable, if only if $A$ and $B$ are diagonalizable. If $A\in\mathbb{C}^n$ ...
19
votes
1answer
4k views

Direct proof that nilpotent matrix has zero trace

Does anyone know a proof from the first principles that a nilpotent matrix has zero trace. No eigenvalues, no characteristic polynomials, just definition and basic facts about bases and matrices.
19
votes
1answer
21k views

Prove: symmetric positive definite matrix

I'm studying for my exam of linear algebra.. I want to prove the following corollary: If $A$ is a symmetric positive definite matrix then each entry $a_{ii}> 0$, ie all the elements of the ...
19
votes
1answer
12k views

How do you write a differential operator as a matrix?

How do you write a differential operator as a matrix? I'm very confused. Could someone please use examples to help me understand? Preferably with first and second-order linear differentiation.