Jump to content

Nonlinear finite elements/Matrices

From Wikiversity

Much of finite elements revolves around forming matrices and solving systems of linear equations using matrices. This learning resource gives you a brief review of matrices.

Suppose that you have a linear system of equations

a11x1+a12x2+a13x3+a14x4=b1a21x1+a22x2+a23x3+a24x4=b2a31x1+a32x2+a33x3+a34x4=b3a41x1+a42x2+a43x3+a44x4=b4 .

Matrices provide a simple way of expressing these equations. Thus, we can instead write

[a11a12a13a14a21a22a23a24a31a32a33a34a41a42a43a44][x1x2x3x4]=[b1b2b3b4].

An even more compact notation is

[𝖠][𝗑]=[𝖻]    or    𝐀𝐱=𝐛 .

Here 𝐀 is a 4×4 matrix while 𝐱 and 𝐛 are 4×1 matrices. In general, an m×n matrix 𝐀 is a set of numbers arranged in m rows and n columns.

𝐀=[a11a12a13…a1na21a22a23…a2n⋮⋮⋮⋱⋮am1am2am3…amn] .

Practice Exercises

[edit | edit source]

Practice: Expressing Linear Equations As Matrices

Types of Matrices

[edit | edit source]

Common types of matrices that we encounter in finite elements are:


  • a row vector that has one row and n columns.
𝐯=[v1v2v3…vn]
  • a column vector that has n rows and one column.
𝐯=[v1v2v3⋮vn]
  • a square matrix that has an equal number of rows and columns.
  • a diagonal matrix which is a square matrix with only the

diagonal elements (aii) nonzero.

𝐀=[a1100…00a220…0⋮⋮⋮⋱⋮000…ann] .
  • the identity matrix (𝐈) which is a diagonal matrix and

with each of its nonzero elements (aii) equal to 1.

𝐀=[100…0010…0⋮⋮⋮⋱⋮000…1] .
  • a symmetric matrix which is a square matrix with elements

such that aij=aji.

𝐀=[a11a12a13…a1na12a22a23…a2na13a23a33…a3n⋮⋮⋮⋱⋮a1na2na3n…ann] .
  • a skew-symmetric matrix which is a square matrix with elements

such that aij=−aji.

𝐀=[a11a12a13…a1n−a12a22a23…a2n−a13−a23a33…a3n⋮⋮⋮⋱⋮−a1n−a2n−a3n…ann] .

Note that the diagonal elements of a skew-symmetric matrix have to be zero: aii=−aii⇒aii=0.

Matrix addition

[edit | edit source]

Let 𝐀 and 𝐁 be two m×n matrices with components aij and bij, respectively. Then

𝐂=𝐀+𝐁⟹cij=aij+bij

Multiplication by a scalar

[edit | edit source]

Let 𝐀 be a m×n matrix with components aij and let λ be a scalar quantity. Then,

𝐂=λ𝐀⟹cij=λaij

Multiplication of matrices

[edit | edit source]

Let 𝐀 be a m×n matrix with components aij. Let 𝐁 be a p×q matrix with components bij.

The product 𝐂=𝐀𝐁 is defined only if n=p. The matrix 𝐂 is a m×q matrix with components cij. Thus,

𝐂=𝐀𝐁⟹cij=∑k=1naikbkj

Similarly, the product 𝐃=𝐁𝐀 is defined only if q=m. The matrix 𝐃 is a p×n matrix with components dij. We have

𝐃=𝐁𝐀⟹dij=∑k=1mbikakj

Clearly, 𝐂≠𝐃 in general, i.e., the matrix product is not commutative.

However, matrix multiplication is distributive. That means

𝐀(𝐁+𝐂)=𝐀𝐁+𝐀𝐂 .

The product is also associative. That means

𝐀(𝐁𝐂)=(𝐀𝐁)𝐂 .

Transpose of a matrix

[edit | edit source]

Let 𝐀 be a m×n matrix with components aij. Then the transpose of the matrix is defined as the n×m matrix 𝐁=𝐀T with components bij=aji. That is,

𝐁=𝐀T=[a11a12a13…a1na21a22a23…a2na31a32a33…a3n⋮⋮⋮⋱⋮am1am2am3…amn]T=[a11a21a31…am1a12a22a32…am2a13a23a33…am3⋮⋮⋮⋱⋮a1na2na3n…amn]

An important identity involving the transpose of matrices is

(𝐀𝐁)T=𝐁T𝐀T .

Determinant of a matrix

[edit | edit source]

The determinant of a matrix is defined only for square matrices.

For a 2×2 matrix 𝐀, we have

𝐀=[a11a12a21a22]⟹det⁡(𝐀)=|a11a12a21a22|=a11a22−a12a21 .

For a n×n matrix, the determinant is calculated by expanding into minors as

det⁡(𝐀)=|a11a12a13…a1na21a22a23…a2na31a32a33…a3n⋮⋮⋮⋱⋮an1an2an3…ann|=a11|a22a23…a2na32a33…a3n⋮⋮⋱⋮an2an3…ann|−a12|a21a23…a2na31a33…a3n⋮⋮⋱⋮an1an3…ann|+⋯±a1n|a21a22…a2(n−1)a31a32…a3(n−1)⋮⋮⋱⋮an1an2…an(n−1)|

In short, the determinant of a matrix 𝐀 has the value

det⁡(𝐀)=∑j=1n(−1)1+ja1jM1j

where Mij is the determinant of the submatrix of 𝐀 formed by eliminating row i and column j from 𝐀.

Some useful identities involving the determinant are given below.


  • If 𝐀 is a n×n matrix, then
det⁡(𝐀)=det⁡(𝐀T) .
  • If λ is a constant and 𝐀 is a n×n matrix, then
det⁡(λ𝐀)=λndet⁡(𝐀)⟹det⁡(−𝐀)=(−1)ndet⁡(𝐀) .
  • If 𝐀 and 𝐁 are two n×n matrices, then
det⁡(𝐀𝐁)=det⁡(𝐀)det⁡(𝐁) .

If you think you understand determinants, take the quiz.

Inverse of a matrix

[edit | edit source]

Let 𝐀 be a n×n matrix. The inverse of 𝐀 is denoted by 𝐀−1 and is defined such that

𝐀𝐀−1=𝐈

where 𝐈 is the n×n identity matrix.

The inverse exists only if det⁡(𝐀)≠0. A singular matrix does not have an inverse.

An important identity involving the inverse is

(𝐀𝐁)−1=𝐁−1𝐀−1,

since this leads to: (𝐀𝐁)−1(𝐀𝐁)=(𝐁−1𝐀−1)(𝐀𝐁)=𝐁−1𝐀−1𝐀𝐁=𝐁−1(𝐀−1𝐀)𝐁=𝐁−1𝐈𝐁=𝐁−1𝐁=𝐈.

Some other identities involving the inverse of a matrix are given below.


  • The determinant of a matrix is equal to the multiplicative inverse of the

determinant of its inverse.

det⁡(𝐀)=1det⁡(𝐀−1) .
  • The determinant of a similarity transformation of a matrix

is equal to the original matrix.

det⁡(𝐁𝐀𝐁−1)=det⁡(𝐀) .

We usually use numerical methods such as Gaussian elimination to compute the inverse of a matrix.

Eigenvalues and eigenvectors

[edit | edit source]

A thorough explanation of this material can be found at Eigenvalue, eigenvector and eigenspace. However, for further study, let us consider the following examples:

  • Let :𝐀=[1652],𝐯=[6−5],𝐭=[74] .

Which vector is an eigenvector for 𝐀 ?

We have 𝐀𝐯=[1652][6−5]=[−2420]=−4[6−5] , and 𝐀𝐭=[1652][74]=[3143] .

Thus, 𝐯 is an eigenvector.

  • Is 𝐮=[14] an eigenvector for 𝐀=[−3−318] ?

We have that since 𝐀𝐮=[−3−318][14]=[−1533] , 𝐮=[14] is not an eigenvector for 𝐀=[−3−318] .