Matrix Buddy

Help


This page is not available in German.

← Back to the application

What does this application do?

Vector algebra in 2D, 3D and 4D. Matrix and Vector. Basic operations.

Quick reference

Top of the window: You can see many buttons each denoting a different kind of matrix or vector operation. Click on one of the buttons and the desired operation becomes active. They are explained in detail further below in the vector operations and matrix operations section.

Dimension chooser: Select the number of dimensions (2D, 3D, 4D) with the control on top in the middle.

Gear icon (in the middle on the top): All kinds of settings.

Bottom of the window: This is where the operation is performed. Enter the matrix or vector values in the textfields. Results will be computed immediately and are indicated by a green color.

Settings

Quick Help Line: Displays or hides a one-line help denoting what the currently selected operation does.

Identifiers: Displays or hides the identifiers above a matrix or vector. Note: errors and warnings will still be displayed, even if this is turned off.

Tab order: Defines how you advance through a matrix with the tab key.

Code style: Displays or hides the code text field below a matrix or vector. You can choose between different code styles.

Help: Displays this help.

Code Style

There does not exist a standard method on how a matrix or a vector shall be copied and pasted between applications. The easiest way is to encode the matrix in a string. When enabling a specific code style in the Settings, you can copy and paste a matrix or vector from and to different applications.

There are different code styles which you can choose from:

No codeHides the code textfield
C row first 1D{1, 2, 3, 4}
C row first 2D{{1, 2}, {3, 4}}
C column first 1D{1, 3, 2, 4}
C column first 2D{{1, 3}, {2, 4}}
Mathematica{{1, 2}, {3, 4}}always row first
Matlab[1 2; 3 4]always row first
Maple[[1, 2], [3, 4]]always row first

Important: The code styles are only for outputting. When you paste code from - for example - Matlab into Matrix Buddy, no special construction operators are allowed!

When you paste code into the code textfield, Matrix Buddy tries to find all values in the given string as a strictly sequential list and fills all remaining values with 0 if not found. Pasted code starting with a curly bracket { will always be interpreted as C style code and hence will be interpreted column first if you have selected one of the column first options. In any other case, the pasted values will be interpreted row first.

Note that support for storing a matrix or a vector internally in a list is planned but not implemented yet. For now, just use a plain text editor to store your matrix or vector data.

Vector operations

v×s: Scalar multiplication of a vector. a × s = b. Scales all components of a with the factor s.

v÷s: Scalar division of a vector. a ÷ s = b. Divides all components of a by s. An error or warning will be emitted if s is zero or close to zero.

v⊙v: Componentwise multiplication of a vector with another vector. a ⊙ b = c. Also known as elementwise multiplication. Multiplies all components of a by the corresponding component of b.

v⊘v: Componentwise division of a vector with another vector. a ⊘ b = c. Also known as elementwise division. Divides all components of a by the corresponding component of b. An error or warning will be emitted if any of the components of b is zero or close to zero.

 

−v: Negation of a vector. v ⟷ -v. You can fill in either side to compute the other vector.

v+v: Addition of a vector to another vector. a + b = c. You can either choose to fill in a and b which computes c or you can choose to fill in a and c which solves the equation resulting in b.

v−v: Subtraction of a vector from another vector. a − b = c. You can either choose to fill in a and b which computes c or you can choose to fill in a and c which solves the equation resulting in b.

v·v: Computes the dot product of two vectors. a · b = s. Also known as the scalar product.

v×v: Computes the cross product of two vectors. a × b = c. Only defined for 3D vectors.

|v|: Computes the euclidian length of a vector. v ⟶ |v|. Also known as 2-Norm.

 

Normalize: Normalizes the given vector. a ⟶ b. The b vector will have length 1. An error or warning will be emitted if a had an initial length of zero or close to zero.

Orthogonalize: Makes a orthogonal to b. a ⊥ b ⟶ c. The c vector will be orthogonal to b. An error or warning will be emitted if a or b had an initial length of zero or close to zero as well as if a was colinear to b or close to colinear. Orthogonalization is performed using the Gram-Schmidt method.

Mirror: Mirrors the vector a along a surface with normal n. a ↥ n ⟶ b. A warning will be emitted if the lenght of n is unequal 1.

Matrix operations

M×s: Scalar multiplication of a matrix. A × s = B. Scales all components of A with the factor s. This is the same as multiplying matrix A with a diagonal matrix having s in all diagonal components.

M÷s: Scalar division of a matrix. A ÷ s = B. Divides all components of A by s. An error or warning will be emitted if s is zero or close to zero.

M⊙v: Componentwise multiplication of a matrix with a vector. A ⊙ v = B. Also known as elementwise multiplication. Multiplies all column vectors of A by the corresponding component of v. This is the same as multiplying matrix A with a diagonal matrix constructed out of v.

M⊘v: Componentwise division of a matrix with a vector. A ⊘ v = B. Also known as elementwise division. Divides all column vectors of A by the corresponding component of v. This is the same as multiplying matrix A with a diagonal matrix constructed out of the inverse values of v. An error or warning will be emitted if any of the components of v is zero or close to zero.

M⊙M: Componentwise multiplication of a matrix. A ⊙ B = C. Also known as elementwise multiplication or Hadamard product. Multiplies all components of A by the corresponding component of B.

M⊘M: Componentwise division of a matrix. A ⊘ B = C. Also known as elementwise division. Divides all components of A by the corresponding component of B. An error or warning will be emitted if any of the components of B is zero or close to zero.

 

−M: Negation of a matrix. A ⟷ -A. You can fill in either side to compute the other matrix.

M+M: Addition of a matrix to another matrix. A + B = C. You can either choose to fill in A and B which computes C or you can choose to fill in A and C which solves the equation resulting in B.

M−M: Subtraction of a matrix from another matrix. A − B = C. You can either choose to fill in A and B which computes C or you can choose to fill in A and C which solves the equation resulting in B.

M×v: Multiplication of a matrix with a vector. A × b = x. You can either choose to fill in A and b which computes x or you can choose to fill in A and x which solves a linear equation system resulting in the b vector. If the matrix A can not be inverted, it will be indicated by an error or warning.

M×M: Multiplication of a matrix with a matrix. A × B = C. You can either choose to fill in A and B which computes C or you can choose to fill in A and C which solves the equation resulting in B. If the matrix A can not be inverted, it will be indicated by an error or warning.

 

Diag(s): Create a diagonal matrix out of a scalar. s ⟶ A. Fill in s to compute A.

Diag(v): Create a diagonal matrix out of a vector. v ⟶ A. Fill in v to compute A.

Transpose: Creates a transposed matrix. A ⟷ Transpose(A). You can fill in either side to compute the other matrix.

Invert: Creates the inverse of a matrix. A ⟷ Invert(A). You can fill in either side to compute the other matrix. If the input matric can not be inverted, it will be indicated by an error or warning