Lapack/blas routine to solve y = Ax

  • Thread starter missfangula
  • Start date
In summary, the individual is seeking a BLAS or LAPACK subroutine to solve the matrix algebra problem of y = A*x, where y and x are known vectors and A is an unknown matrix. They have found the subroutine dgemv for a similar problem with a known matrix and vector. The matrix A is a 4x4 matrix with the bottom row being [0 0 0 1] and the first three elements of the fourth column being the same as the elements of y. They have searched through lapack and blas for a subroutine but have not found one with the known vectors and unknown matrix. The expert suggests using DGELSD to solve the underdetermined system for the minimum norm solution.
  • #1
missfangula
32
0
Hello everyone,

I am working on a matrix algebra-based project for an unrelated class, but unfortunately, I have no background in matrix algebra. I have managed so far to do most of the work, but I am stuck in my search for the right BLAS or LAPACK subroutine which could solve the following problem:
y = A*x
where y and x are KNOWN vectors, and A is an UNKNOWN matrix. I have found the subroutine dgemv which solves y = A*x, but with A as a KNOWN matrix and y as a KNOWN vector.

As additional information, A is a 4x4 matrix, y, and x are known 4-d vectors. In matrix A, the bottom row is just 0,0,0,1, and the first three elements of column 4 are the same as the elements of vector y.

So it looks like this:

[knownY] [unknown unknown unknown knownY] [0.0]
[knownY] = [unknown unknown unknown knownY]*[0.0]
[knownY] [unknown unknown unknown knownY] [0.0]
[ 1.0 ] [ 0.0 0.0 0.0 1.0 ] [1.0]

My attempt has been to look through lapack and blas for a subroutine, but I cannot find one where the two vectors are known and the matrix is what I am trying to solve for.

Thanks!
-miss fangula
 
Physics news on Phys.org
  • #2
Something looks goofy. My interpretation of what you posted is that y = [y1 y2 y3 1]T and x = [0 0 0 1]T. If so, then any values can be used for the 9 unknown elements of A since they are all multiplied by zero.

In general, there are infinitely many solutions to the problem y = Ax, where y and x are known n-vectors and A is an unknown n x n matrix. If you write out the equations you have n equations with n2 unknowns in the form Bc = y, where B is a banded matrix of known values having n rows and n2 columns and c is a vector of n2 unknown elements of A. This is an underdetermined system (i.e. more unknowns than equations) that can be solved for the minimum norm solution using LAPACK routine DGELSD.
 
Last edited:

FAQ: Lapack/blas routine to solve y = Ax

What is Lapack/blas routine for solving y = Ax?

Lapack (Linear Algebra Package) and Blas (Basic Linear Algebra Subprograms) are libraries of standardized routines for performing linear algebra operations. The routine to solve y = Ax refers to a specific set of routines within these libraries that are used for solving systems of linear equations.

How does Lapack/blas routine solve y = Ax?

The Lapack/blas routine for solving y = Ax uses a combination of matrix factorization and matrix multiplication techniques to find the solution to the system of linear equations. This involves breaking down the matrix A into simpler forms, which can then be used to efficiently solve for the values of x that satisfy the equation.

What is the input and output of Lapack/blas routine for solving y = Ax?

The input for the Lapack/blas routine for solving y = Ax includes the matrix A and the vector y. The output is the vector x, which contains the values that satisfy the equation y = Ax.

How accurate is the solution obtained from Lapack/blas routine for solving y = Ax?

The accuracy of the solution obtained from the Lapack/blas routine for solving y = Ax depends on the precision of the input data and the numerical stability of the algorithm used. Generally, these routines are highly accurate and can handle large and complex systems of linear equations.

Can Lapack/blas routine solve other types of equations?

Yes, the Lapack/blas routine for solving y = Ax can also be used to solve other types of linear equations, such as least squares problems and eigenvalue problems. However, for nonlinear equations, different techniques and libraries may need to be used.

Similar threads

Replies
5
Views
2K
Replies
1
Views
2K
Replies
2
Views
2K
Replies
22
Views
4K
Replies
4
Views
2K
Replies
2
Views
1K
Replies
8
Views
2K
Back
Top