switch row 1 and 2 : H 1 2 +-----------+ 1 | 4 10 | 2 | 2 6 | +-----------+ : I = invsym(F'*F) // Generalized inverse (F*F^(-1)F=F) of a : // symmetric positive semi-definite matrix : I [symmetric] 1 2 3 +-------------------------------------------+ 1 | 0 | 2 | 0 3.25 | 3 | 0 -1.75 .9444444444 | +-------------------------------------------+ : end MATLAB The implementation in MATLAB allows the same economy allowed by using the Fortran language. A = A + B; A variant of the MATLAB language is the GNU Octave language, which extends the original language with augmented assignments: A += B; Both MATLAB and GNU Octave natively support linear algebra operations such as matrix multiplication, matrix inversion, and the numerical solution of system of linear equations, even using the Moore–Penrose pseudoinverse. The Nial example of the inner product of two arrays can be implemented using the native matrix multiplication operator. If a is a row vector of size [1 n] and b is a corresponding column vector of size [n 1]. a * b; The inner product between two matrices having the same number of elements can be implemented with the auxiliary operator (:), which reshapes a given matrix into a column vector, and the transpose operator ': A(:)' * B(:); rasql The rasdaman query language is a database-oriented array-programming language. For example, two arrays could be added with the following query: SELECT A + B FROM A, B R The R language supports array paradigm by default. The following example illustrates a process of multiplication of two matrices followed by an addition of a scalar (which is, in fact, a one-element vector) and a vector: > A <- matrix(1:6, nrow=2) # !!this has nrow=2 ... and A has 2 rows > A [,1] [,2] [,3] [1,] 1 3 5 [2,] 2 4 6 > B <- t( matrix(6:1, nrow=2) ) # t() is a transpose operator !!this has nrow=2 ... and B has 3 rows --- a clear contradiction to the definition of A > B [,1] [,2] [1,] 6 5 [2,] 4 3 [3,] 2 1 > C <- A %*% B > C [,1] [,2] [1,] 28 19 [2,] 40 28 > D <- C + 1 > D [,1] [,2] [1,] 29 20 [2,] 41 29 > D + c(1, 1) # c() creates a vector [,1] [,2] [1,] 30 21 [2,] 42