# Bidiagonal

```
.. Bidiagonal(dv, ev, isupper)
Constructs an upper (``isupper=true``) or lower (``isupper=false``) bidiagonal matrix
using the given diagonal (``dv``) and off-diagonal (``ev``) vectors. The result is of type ``Bidiagonal`` and provides efficient specialized linear solvers, but may be converted into a regular matrix with :func:`full`.
```

## Examples

```
"""
Bidiagonal(dv, ev, isupper)
Constructs an upper (`isupper=true`) or lower (`isupper=false`) bidiagonal matrix using the given diagonal (`dv`) and off-diagonal (`ev`) vectors. The result is of type `Bidiagonal` and provides efficient specialized linear solvers but may be converted into a regular matrix with `full`.
"""
# Example 1: Construct an upper bidiagonal matrix
julia> dv = [1, 2, 3]
julia> ev = [4, 5, 6]
julia> isupper = true
julia> b = Bidiagonal(dv, ev, isupper)
3×3 Bidiagonal{Int64,Array{Int64,1}}:
1 4 ⋅
⋅ 2 5
⋅ ⋅ 3
# Example 2: Construct a lower bidiagonal matrix
julia> dv = [1, 2, 3]
julia> ev = [4, 5, 6]
julia> isupper = false
julia> b = Bidiagonal(dv, ev, isupper)
3×3 Bidiagonal{Int64,Array{Int64,1}}:
1 ⋅ ⋅
4 2 ⋅
⋅ 5 3
# Example 3: Convert Bidiagonal matrix to a full matrix
julia> full(b)
3×3 Array{Int64,2}:
1 0 0
4 2 0
0 5 3
```

This function constructs a bidiagonal matrix using the given diagonal (`dv`

) and off-diagonal (`ev`

) vectors. The `isupper`

argument determines whether the matrix is upper or lower bidiagonal. The resulting matrix can be used for efficient specialized linear solvers. If needed, the `Bidiagonal`

matrix can be converted into a regular matrix using the `full`

function.

## See Also

Ac_ldiv_B, Ac_ldiv_Bc, Ac_mul_B, Ac_mul_Bc, Ac_rdiv_B, Ac_rdiv_Bc, At_ldiv_B, At_ldiv_Bt, At_mul_B, At_mul_Bt, At_rdiv_B, At_rdiv_Bt, A_ldiv_Bc, A_ldiv_Bt, A_mul_B!, A_mul_Bc, A_mul_Bt, A_rdiv_Bc, A_rdiv_Bt, Bidiagonal, cond, conv2, det, diag, diagind, diagm, diff, eig, eigvals, eigvecs, expm, eye, full, inv, isdiag, ishermitian, isposdef, isposdef!, issym, istril, istriu, logabsdet, logdet, lyap, norm, qrfact, rank, repmat, rot180, rotl90, rotr90, sortrows, sqrtm, SymTridiagonal, trace, Tridiagonal, tril, tril!, triu, triu!, writedlm,## User Contributed Notes

### Add a Note

The format of note supported is markdown, use triple backtick to start and end a code block.