How to calculate triangle area with matrix? Know the coordinates of the three angles, how to use the matrix to calculate the area of the triangle? Just want to know how to calculate the process of D?

How to calculate triangle area with matrix? Know the coordinates of the three angles, how to use the matrix to calculate the area of the triangle? Just want to know how to calculate the process of D?


It's determinant, not matrix
Three known points (x1, Y1) (X2, Y2) (X3, Y3)
|x1 y1 1|
|x2 y2 1|=D
|x3 y3 1|
Then the area s = D / 2
D=x1y2+x2y3+x3y1-x1y2-x2y1-x3y2



How to find the inverse of upper triangular matrix
An n-order matrix is transformed into an upper triangular matrix by the method of matrix partition. If we want to find the inverse matrix of this matrix, how can we use the upper triangular matrix to find? (and the lower triangular matrix) a formula~


There is no formula for the inverse of the upper (lower) triangular matrix
(because it's too complicated to be necessary)
(a, e) is transformed into (E, a ^ - 1) by elementary row transformation



Why is it wrong to find the area of triangle by matrix?
Point a (2,3,9) B (1,2,3) C (3,3,12)
ABC area is the absolute value of the difference of AB vector multiplied by BC vector and divided by 2
AB vector is (1,1,6) BC is (2,1,9)
In the end, I figured out that 5 / 2 was wrong
Why?


(1,1,6)×(2,1,9)=(1×9-1×6,6×2-1×9,1×1-1×2)=(3,3,-1)
|(3,3,-1)|=√19
S=(√19)/2



How to construct matrix from n observation data U (1), u (1),..., u (n) with MATLAB


If f = 0 (homogeneous equation), Cramer's law, and can find a solution (determinant det (command));, if f 0 (heterogeneous), Gauss elimination method (i.e. elementary transformation method) can find a solution. Matlab command Lu Lu Lu decomposition matrix, if it is a sparse matrix, can use the command lunic



How to write the MATLAB statement of matrix element summation? For example, see the table below


How to write the MATLAB statement of matrix element summation? For example, see the table below
Sum function
>> x=[2 3 4]
x =
2 3 4
>> sum(x)
ans =
nine
Sum function usage:
B = sum(A)
Returns the sum of different dimensions of array a
If a is a vector, sum (a) returns the sum of all elements
If a is a matrix, sum (a) takes the column of a as a vector and returns a row vector containing the sum of all elements in each column
If a is a multidimensional array, sum (a) takes all dimensions as an array and returns a row vector array
B = sum(A,dim) book.iLoveMatlab.cn
The sum is calculated along each dimension of a using the specified scalar dim, which is an integer value from 1 to N, where n is the dimension of A
Dim = 1 is the sum of each column of a, 2 is the sum of each row of a, and so on
B = sum (...,'double ') and B = sum (..., dim,' double ')
In double, the result of double type is returned, even if a is single data type or integer data type
The default is integer data type
B = sum (...,'native ') and B = sum (..., dim,' native ')
Add and sum in native data type, return the result of the same type, the default is single and double
Reference: green bamboo is another third of the scenery, red plum is reporting Wanjia spring back to the earth



In MATLAB, the linear equation of 4 variables, such as a * x + b * y + C * Z + D * u = f, where xyzu is the unknown matrix, adcdf is the coefficient matrix, and there are n groups of data,


If f = 0 (homogeneous equation), the solution can be obtained by using Cramer's Law (DET () for determinant); if f is not 0 (non-homogeneous), the solution can be obtained by using Gauss elimination method (elementary transformation method)



How to generate an M * n matrix in MATLAB, so that the elements are symbolic variables


It can be generated by loop
syms A;
for i=1:M
for j=1:N
A(i,j)=sym (['a',num2str(i),num2str(j)]);
end
end
That's it
When m = n = 3, the running result is
A =
[ a11,a12,a13]
[ a21,a22,a23]
[ a31,a32,a33]



How to use matlab to solve the second order differential equation with coefficient a * U "+ b * u '+ C * u = k


U=dsolve('A*D2U+B*DU+C*U=K')
you're welcome



What is the orthogonality of two matrices? How to express it? What is the orthogonality group?


If two matrices are orthogonal, it means that the two matrices are orthogonal
Orthogonal matrix means that row vectors or column vectors are linearly independent, and the product of any two row vectors or column vectors is zero, and the product of itself and itself is constant (any constant). If a group of vectors have zero product of each other and 1 product of itself, it is a standard orthogonal group



What is the inverse Hermite matrix and what is the relationship between it and Hermite matrix


An inverse Hermite matrix is a matrix whose conjugate transpose is its negative matrix
If a is an anti Hermite matrix, then IA is a Hermite matrix. Every complex valued square matrix can be uniquely expressed as the sum of an anti Hermite matrix and a Hermite matrix